Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to version v0.5.1 #6

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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