Skip to content

Commit

Permalink
Merge pull request #3 from NodleCode/iso/20231112T1855-work
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
simonsso authored Nov 13, 2023
2 parents c3b2929 + 011c5d7 commit 4d79594
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
Expand Down
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.3.5
FROM ghcr.io/nodlecode/try-runtime-cli:v0.4.0

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,28 @@ 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.3.5`).
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`).
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.3.5`).
4. Draft a new github release for the same version number (`v0.3.5` 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.4.0`).
4. Draft a new github release for the same version number (`v0.4.0` 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

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
```
Build and run image locally
```
cd base
docker build --build-arg VERSION=v0.4.0 . -t milkman -f ./Dockerfile

docker run milkman try-runtime --version
docker run milkman try-runtime --help
docker run -v ~/nodle/chain/snapshots:/snapshots milkman try-runtime --runtime ./snapshots/runtime_eden.wasm on-runtime-upgrade snap -p snapshots/eden-ci
```

0 comments on commit 4d79594

Please sign in to comment.