Pin each release's rust base image by digest #67
Workflow file for this run
This file contains hidden or 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: build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| smoke-build: | |
| name: build & smoke-test newest image | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: resolve newest pair | |
| id: pair | |
| run: | | |
| cli="$(./scripts/newest_pair.py --stellar-cli-version)" | |
| # The newest pair is a fully-qualified pin: <label>@sha256:<digest>. | |
| pin="$(./scripts/newest_pair.py --rust-version)" | |
| rust="${pin%@*}" | |
| digest="${pin#*@}" | |
| tag="$(./scripts/tag_names.py \ | |
| --stellar-cli-version "$cli" --rust-version "$rust")" | |
| { | |
| echo "cli=$cli" | |
| echo "rust=$rust" | |
| echo "digest=$digest" | |
| echo "image=stellar-cli:$tag" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: build image | |
| run: | | |
| ./scripts/build_image.py \ | |
| --stellar-cli-version "${{ steps.pair.outputs.cli }}" \ | |
| --rust-version "${{ steps.pair.outputs.rust }}" \ | |
| --rust-image-digest "${{ steps.pair.outputs.digest }}" | |
| - name: smoke test | |
| run: | | |
| ./scripts/smoke_test_image.py \ | |
| --image "${{ steps.pair.outputs.image }}" \ | |
| --stellar-cli-version "${{ steps.pair.outputs.cli }}" \ | |
| --rust-version "${{ steps.pair.outputs.rust }}" \ | |
| --rust-image-digest "${{ steps.pair.outputs.digest }}" | |
| - name: wasm reproducibility | |
| run: | | |
| ./scripts/repro_test.py \ | |
| --image "${{ steps.pair.outputs.image }}" | |
| complete: | |
| if: always() | |
| needs: | |
| - smoke-build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: check upstream jobs | |
| if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
| run: exit 1 |