Skip to content

Commit

Permalink
Add workflow to build wasm simapp (cosmos#5286)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton committed Nov 30, 2023
1 parent 1992905 commit 6fe8b6c
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release-wasm.yml
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}"

0 comments on commit 6fe8b6c

Please sign in to comment.