From 649ab011c1ebae270ce7f45e82a1cdaf79f2be19 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 30 Oct 2023 13:38:33 -0400 Subject: [PATCH] Fix autotag triggering tag build --- .github/workflows/push.yml | 8 +++++++- .github/workflows/release.yml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3e0722ee..853fc004 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,11 @@ name: Build and Push Docker Images on: push: + workflow_dispatch: + inputs: + tag: + type: string + required: true concurrency: group: ${{ github.ref }} cancel-in-progress: true @@ -11,7 +16,8 @@ jobs: tags: uses: ./.github/workflows/tags.yml with: - tag: ${{ github.ref_name }} + # Use tag from workflow_dispatch OR push event + tag: ${{ inputs.tag && inputs.tag || github.ref_name }} secrets: inherit base: uses: ./.github/workflows/build.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3b5bda5..7408500d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: - closed permissions: contents: write + actions: write jobs: release: if: github.event.pull_request.merged == true @@ -24,5 +25,6 @@ jobs: git tag $TAG git push origin $TAG gh release create $TAG + gh workflow run push.yml -f tag=$TAG --ref $TAG env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}