Skip to content

Commit

Permalink
Merge pull request #6 from NodleCode/iso/20231204T1345-v0.5.1
Browse files Browse the repository at this point in the history
Upgrade to version v0.5.1
  • Loading branch information
simonsso authored Dec 5, 2023
2 parents ac1d169 + 2224ede commit f2873d3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/checkversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Version in GHCR

on:
pull_request:
# Run jobs for any external PR that wants
# to merge to master, too:
branches:
- master
- main

jobs:
Check-if-version-in-GHCR-is-built:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: head -1 Dockerfile | sed 's/FROM \(.*\)/docker run \1 try-runtime -V/'|bash
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/nodlecode/try-runtime-cli:v0.4.0
FROM ghcr.io/nodlecode/try-runtime-cli:v0.5.1

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,32 @@ with:

> By convention please follow the release numbers from [Parity's repo](https://github.com/paritytech/try-runtime-cli).

1. Run the [prebuild github action](https://github.com/NodleCode/action-try-runtime/actions/workflows/base-image.yml) to pre-build `try-runtime`. Pass it the latest version from parity's repo (for example `v0.4.0`).
1. Run the [prebuild github action](https://github.com/NodleCode/action-try-runtime/actions/workflows/base-image.yml) to pre-build `try-runtime`. Pass it the latest version from parity's repo (for example `v0.5.1`).
2. Wait for the action to build succesfully, which will take a little while.
3. Update the first line in the action [`Dockerfile`](./Dockerfile) to use the version number of the new prebuilt container (in this example `v0.4.0`).
4. Draft a new github release for the same version number (`v0.4.0` in this example).
3. Update the first line in the action [`Dockerfile`](./Dockerfile) to use the version number of the new prebuilt container (in this example `v0.5.1`).
4. Draft a new github release for the same version number (`v0.5.1` in this example).
5. You may now use the newly release and built action in your CI/CD pipeline.

> We prebuild a docker container with `try-runtime` to ensure Github does not rebuilt `try-runtime` everytime we use this action, thus giving us a nice speed improvement.

### Troubleshooting

Verify online version

```
docker run ghcr.io/nodlecode/try-runtime-cli:v0.5.1 try-runtime -V
```
Execute the prebuilt docker image
```
docker run -v ~/nodle/chain/snapshots:/snapshots ghcr.io/nodlecode/try-runtime-cli:v0.4.0 try-runtime --runtime ./snapshots/runtime_eden.wasm on-runtime-upgrade snap -p snapshots/eden-ci
docker run -v ~/nodle/chain/snapshots:/snapshots ghcr.io/nodlecode/try-runtime-cli:v0.5.1 try-runtime --runtime ./snapshots/runtime_eden.wasm on-runtime-upgrade snap -p snapshots/eden-ci
```
Build and run image locally
```
cd base
docker build --build-arg VERSION=v0.4.0 . -t milkman -f ./Dockerfile
docker build --build-arg VERSION=v0.5.1 . -t milkman -f ./Dockerfile

docker run milkman try-runtime --version
docker run milkman try-runtime --help
Expand Down

0 comments on commit f2873d3

Please sign in to comment.