forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to build wasm simapp (cosmos#5286)
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build Wasm Docker Simapp | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
docker_tag: | ||
description: 'The docker tag for the wasm image' | ||
required: true | ||
type: string | ||
branch: | ||
description: 'Branch to build from' | ||
required: true | ||
type: choice | ||
options: | ||
- "08-wasm/release/v0.1.x+ibc-go-v7.3.x-wasmvm-v1.5.x" | ||
- "08-wasm/release/v0.1.x+ibc-go-v8.0.x-wasmvm-v1.5.x" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ibc-go-wasm-simd | ||
ORG: cosmos | ||
DOCKER_TAG: "${{ github.event.inputs.docker_tag }}" | ||
|
||
jobs: | ||
publish-docker-image-wasm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ github.event.inputs.branch }}" | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: make python-install-deps | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
run: | | ||
# remove any `/` characters from the docker tag and replace them with a - | ||
version="$(scripts/get-libwasm-version.py --get-version)" | ||
checksum="$(scripts/get-libwasm-version.py --get-checksum)" | ||
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${DOCKER_TAG}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum} | ||
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${DOCKER_TAG}" |