I2::Dev::Nightly::Publish #31
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
name: I2::Dev::Nightly::Publish | |
on: workflow_dispatch | |
env: | |
DEFAULTS_DIR: defaults | |
WASM_TARGET_DIR: wasm/target/prebuilt | |
jobs: | |
build_wasm_libs: | |
runs-on: ubuntu-latest | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-09-09 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wasm libs | |
run: ./scripts/build_wasm.sh libs | |
- name: Upload wasm libs to reuse in other jobs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-libs | |
path: ${{ env.WASM_TARGET_DIR }}/libs | |
retention-days: 1 | |
dockerhub: | |
runs-on: ubuntu-latest | |
needs: build_wasm_libs | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-09-09 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download wasm libs | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-libs | |
path: ${{ env.DEFAULTS_DIR }}/libs | |
- name: Move the default executor | |
run: mv ${{ env.DEFAULTS_DIR }}/libs/default_executor.wasm ${{ env.DEFAULTS_DIR }}/executor.wasm | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push iroha2:dev-nightly image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: hyperledger/iroha:dev-nightly-${{ github.sha }} | |
labels: commit=${{ github.sha }} | |
build-args: TAG=dev | |
# This context specification is required | |
context: . |