From d054c00d24ae45794141e91bb44aa91d59d710e3 Mon Sep 17 00:00:00 2001 From: Emir Beganovic Date: Fri, 9 Oct 2026 20:07:53 +0200 Subject: [PATCH] Nightly: a re-run publishes under its own number Starting a run again keeps its run number, so a second attempt would have built new images for the paths the first attempt had already partly filled, and the upload refuses to replace a file. From the second attempt on, the attempt is part of the number: 431, then 431.2. --- .github/workflows/nightly-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index e2f34e8..9f22171 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -61,7 +61,11 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - edge=$(date -u +%Y.%m.%d).${{ github.run_number }} + # A run that is started again makes its images again, and they are + # not the same bytes: it gets its own number too. + build=${{ github.run_number }} + [[ ${{ github.run_attempt }} == 1 ]] || build+=.${{ github.run_attempt }} + edge=$(date -u +%Y.%m.%d).$build stable=$(gh api repos/omacom/omarchy/releases/latest --jq .tag_name) stable=${stable#v} [[ $stable =~ ^[0-9]+(\.[0-9]+)+$ ]] || { echo "::error::omacom/omarchy's latest release is '$stable', not a version"; exit 1; } @@ -70,7 +74,7 @@ jobs: if [[ $GITHUB_EVENT_NAME == schedule && $published == "$stable" ]]; then echo "stable $stable is already published" else - channels=$(jq -c --arg stable "$stable" --arg run "${{ github.run_number }}" \ + channels=$(jq -c --arg stable "$stable" --arg run "$build" \ '. + [{channel: "stable", version: $stable, release: "stable/\($stable)/\($run)"}]' <<<"$channels") fi echo "channels=$channels" | tee -a "$GITHUB_OUTPUT"