From ae83d27e4bd44332ed0ef146cf8655e21db27b87 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Wed, 30 Sep 2026 06:44:52 -0700 Subject: [PATCH] ci: name the tag in GitHub's tag status, and make digests re-runnable Commit statuses belong to the commit, not the tag. Upstream v* tags and inbuxa-v* tags can sit on the same commit, so Gitea's github job, waiting for "github/ci (tag)", could read the other tag's older result and move on before this tag's build finished. A tag's status is now "github/ci (tag )" on both sides. The per-architecture digest artifacts are also overwritable and kept for a week, so re-running a build, or publish on its own, still works. --- .gitea/workflows/ci.yml | 2 +- .github/workflows/ci.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cf82fd1..c1fec69 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -228,7 +228,7 @@ jobs: env: TOKEN: ${{ secrets.GITHUB_TOKEN }} SHA: ${{ github.event.pull_request.head.sha || github.sha }} - CONTEXT: github/ci (${{ github.ref_type == 'tag' && 'tag' || 'branch' }}) + CONTEXT: github/ci (${{ github.ref_type == 'tag' && format('tag {0}', github.ref_name) || 'branch' }}) steps: - run: apt-get update -qq && apt-get install -y -qq --no-install-recommends ca-certificates curl jq >/dev/null - shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f782c0e..3fdbd36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,9 @@ env: REGISTRY: ${{ vars.REGISTRY }} # A registry path must be lowercase; the repository name already is. IMAGE: ${{ vars.REGISTRY }}/inbuxa/ihasmail-inbuxa - STATUS_CONTEXT: github/ci (${{ github.ref_type }}) + # A tag's context names the tag: upstream v* and inbuxa-v* tags can sit on + # the same commit, and Gitea must not read one tag's result as the other's. + STATUS_CONTEXT: github/ci (${{ github.ref_type == 'tag' && format('tag {0}', github.ref_name) || 'branch' }}) jobs: # Tells Gitea a result is on its way, so a PR shows the check as running @@ -179,7 +181,10 @@ jobs: with: name: digest-${{ strategy.job-index }} path: /tmp/digests/* - retention-days: 1 + # Kept a week, and overwritable, so a re-run of the build or of + # publish alone still finds (or replaces) the digests. + retention-days: 7 + overwrite: true if-no-files-found: error # Joins the digests into `:` and `:latest`, links the package to