From 91d3b9c9f26587cf3e9b12853609c5f423d6d0c0 Mon Sep 17 00:00:00 2001 From: kawa Date: Sun, 18 Oct 2026 01:18:13 +0200 Subject: [PATCH] Keep the dev tag check strict and default the tag in the workflow The earlier script default broke the tests that reject empty tags. The workflow now falls back to dev- for manual runs. Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/publish-image.yml | 2 +- scripts/image-publication.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/publish-image.yml b/.gitea/workflows/publish-image.yml index d1d5273..4a207f6 100644 --- a/.gitea/workflows/publish-image.yml +++ b/.gitea/workflows/publish-image.yml @@ -35,7 +35,7 @@ jobs: env: EVENT_NAME: ${{ github.event_name }} GIT_REF: ${{ github.ref }} - INPUT_TAG: ${{ github.event.inputs.tag || inputs.tag }} + INPUT_TAG: ${{ github.event.inputs.tag || inputs.tag || format('dev-{0}', github.sha) }} SERVER_URL: ${{ github.server_url }} REPOSITORY: ${{ github.repository }} run: node scripts/image-publication.mjs diff --git a/scripts/image-publication.mjs b/scripts/image-publication.mjs index 706b3be..3073104 100644 --- a/scripts/image-publication.mjs +++ b/scripts/image-publication.mjs @@ -9,7 +9,7 @@ export function imagePublication({ event, ref, inputTag, revision }) { let tag, channel; if (event === "workflow_dispatch") { - tag = inputTag || `dev-${revision.slice(0, 7)}`; + tag = inputTag ?? ""; const commit = /^dev-([0-9a-f]{7,40})$/.exec(tag)?.[1]; if (!commit || tag !== tag.trim()) throw new Error(