From b086496e0b8680815a96373489d77723c236d843 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Thu, 29 Oct 2026 15:23:33 -0400 Subject: [PATCH 1/2] Only build wasmtime for dependabot PR when changed Dependabot bumping wasmtime is only focused on a single version. There's no need to build other version of wasmtime, even if they fail the pre-flight checks. This is particularly true for dev builds which often fail the pre-flight Signed-off-by: Scott Andrews --- .github/workflows/publish-wasmtime.yaml | 7 ++++++- .github/workflows/pull-request.yaml | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-wasmtime.yaml b/.github/workflows/publish-wasmtime.yaml index 1dd4808..75ffcaa 100644 --- a/.github/workflows/publish-wasmtime.yaml +++ b/.github/workflows/publish-wasmtime.yaml @@ -33,6 +33,10 @@ on: description: force overwriting an existing image type: boolean default: false + skip: + description: skip all jobs, useful to exclude an entry from a calling matrix + type: boolean + default: false builder-image: description: image used to build wasmtime type: string @@ -55,6 +59,7 @@ env: jobs: preflight: name: Preflight ${{ inputs.tag }} + if: ${{ ! inputs.skip }} runs-on: ubuntu-latest outputs: existing-digest: ${{ steps.existing.outputs.digest }} @@ -296,7 +301,7 @@ jobs: tag: name: Tag ${{ inputs.tag }} needs: publish - if: always() && !failure() && !cancelled() && inputs.publish && inputs.additional-tags + if: always() && !failure() && !cancelled() && !inputs.skip && inputs.publish && inputs.additional-tags runs-on: ubuntu-latest permissions: packages: write diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index d3e939f..616e987 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -10,6 +10,7 @@ jobs: permissions: pull-requests: read outputs: + wasmtime-bump: ${{ steps.versions.outputs.wasmtime-bump }} rust-toolchain: ${{ steps.versions.outputs.rust-toolchain }} wasmtime-dev-git-sha: ${{ steps.versions.outputs.wasmtime-dev-git-sha }} wasmtime-next-changed: ${{ steps.filter.outputs.wasmtime-next }} @@ -54,6 +55,9 @@ jobs: run: | set -euo pipefail + # dependabot PRs that bump a wasmtime version only build the bumped version + echo "wasmtime-bump=${{ startsWith(github.head_ref, 'dependabot/cargo/versions/wasmtime/') }}" | tee -a "${GITHUB_OUTPUT}" + echo "rust-toolchain=$(yq -r '.toolchain.channel' rust-toolchain.toml)" | tee -a "${GITHUB_OUTPUT}" # dev @@ -107,50 +111,62 @@ jobs: wasmtime-crate: "" wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-dev-git-sha }} force: ${{ needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' }} - tag: dev-${{ needs.preflight.outputs.wasmtime-dev-git-sha }}-alpine wasmtime-crate: "" wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-dev-git-sha }} force: ${{ needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-next-version }} wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-next-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-next-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-next-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-next-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-next-version }}-alpine wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-next-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-next-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-next-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-next-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-stable-version }} wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-stable-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-stable-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-stable-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-stable-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-stable-version }}-alpine wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-stable-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-stable-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-stable-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-stable-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-stable-1-version }} wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-stable-1-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-stable-1-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-stable-1-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-stable-1-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-stable-1-version }}-alpine wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-stable-1-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-stable-1-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-stable-1-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-stable-1-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-lts-version }} wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-lts-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-lts-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-lts-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-lts-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-lts-version }}-alpine wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-lts-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-lts-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-lts-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-lts-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-lts-1-version }} wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-lts-1-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-lts-1-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-lts-1-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-lts-1-changed != 'true' }} - tag: v${{ needs.preflight.outputs.wasmtime-lts-1-version }}-alpine wasmtime-crate: ${{ needs.preflight.outputs.wasmtime-lts-1-version }} wasmtime-git-sha: ${{ needs.preflight.outputs.wasmtime-lts-1-git-sha }} force: ${{ needs.preflight.outputs.wasmtime-lts-1-changed == 'true' || needs.preflight.outputs.common-changed == 'true' }} + skip: ${{ needs.preflight.outputs.wasmtime-bump == 'true' && needs.preflight.outputs.wasmtime-lts-1-changed != 'true' }} uses: ./.github/workflows/publish-wasmtime.yaml with: rust-toolchain: "${{ needs.preflight.outputs.rust-toolchain }}" @@ -159,6 +175,7 @@ jobs: tag: "${{ matrix.tag }}" publish: false force: ${{ matrix.force }} + skip: ${{ matrix.skip }} secrets: inherit done: From a3dcbf453ed584715490271c30b5d291014c1e28 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Thu, 29 Oct 2026 16:23:54 -0400 Subject: [PATCH 2/2] avoid CI artifact name collisions Signed-off-by: Scott Andrews --- .github/workflows/manual-publish.yaml | 30 ++++++++++---------- .github/workflows/publish-wasmtime.yaml | 26 +++++++++++------ .github/workflows/publish.yaml | 37 +++++++++++++++++-------- .github/workflows/pull-request.yaml | 37 +++++++++++++++++-------- 4 files changed, 82 insertions(+), 48 deletions(-) diff --git a/.github/workflows/manual-publish.yaml b/.github/workflows/manual-publish.yaml index cc45073..8722776 100644 --- a/.github/workflows/manual-publish.yaml +++ b/.github/workflows/manual-publish.yaml @@ -29,7 +29,6 @@ on: type: string jobs: - preflight: name: Preflight runs-on: ubuntu-latest @@ -38,23 +37,23 @@ jobs: wasmtime-git-sha: ${{ steps.versions.outputs.wasmtime-git-sha }} additional-tags: ${{ steps.versions.outputs.additional-tags }} steps: - - uses: actions/checkout@v7 - - name: Resolve versions - id: versions - run: | - set -euo pipefail + - uses: actions/checkout@v7 + - name: Resolve versions + id: versions + run: | + set -euo pipefail - echo "rust-toolchain=${{ inputs.rust-toolchain || '$(yq -r ''.toolchain.channel'' rust-toolchain.toml)' }}" | tee -a "${GITHUB_OUTPUT}" + echo "rust-toolchain=${{ inputs.rust-toolchain || '$(yq -r ''.toolchain.channel'' rust-toolchain.toml)' }}" | tee -a "${GITHUB_OUTPUT}" - wasmtime_git_sha="$(gh api "repos/bytecodealliance/wasmtime/commits/${{ inputs.wasmtime-git-ref }}" --template '{{.sha}}')" - echo "wasmtime-git-sha=${wasmtime_git_sha}" | tee -a "${GITHUB_OUTPUT}" + wasmtime_git_sha="$(gh api "repos/bytecodealliance/wasmtime/commits/${{ inputs.wasmtime-git-ref }}" --template '{{.sha}}')" + echo "wasmtime-git-sha=${wasmtime_git_sha}" | tee -a "${GITHUB_OUTPUT}" - # convert space delimited to new-line delimited - echo 'additional-tags<