Skip to content

Commit 70f9dbf

Browse files
philipbalinovclaude
andcommitted
🐛 Fix goreleaser workflow conditions for tag pushes
The workflow conditions were failing on tag pushes because the `inputs` context is undefined when not triggered via workflow_dispatch. Changes: - Fix "Trigger mql bump in cnspec" to run on tag pushes by checking `github.event_name == 'push'` as a fallback - Simplify GoReleaser step conditions to use only the skip-publish step output, consolidating the logic in one place (the skip-publish step already checks the input) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2116076 commit 70f9dbf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
# created a discussion on the issue here https://github.com/orgs/goreleaser/discussions/5943
152152

153153
- name: Run GoReleaser and promote latest
154-
if: ${{ inputs.skip-publish != true && steps.skip-publish.outputs.skip-publish != 'true' }}
154+
if: ${{ steps.skip-publish.outputs.skip-publish != 'true' }}
155155
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
156156
with:
157157
distribution: goreleaser
@@ -177,7 +177,7 @@ jobs:
177177
MAKE_LATEST: ${{ inputs.make-latest == false && 'false' || 'true' }}
178178

179179
- name: Run GoReleaser without promoting 'latest'
180-
if: ${{ inputs.skip-publish == true || steps.skip-publish.outputs.skip-publish == 'true' }}
180+
if: ${{ steps.skip-publish.outputs.skip-publish == 'true' }}
181181
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
182182
with:
183183
distribution: goreleaser
@@ -228,7 +228,7 @@ jobs:
228228
# We can now trigger the mql bump in cnspec, which will also trigger the release of cnspec.
229229
# The docker container is a pre-requisite for cnspec release.
230230
- name: Trigger mql bump in cnspec
231-
if: ${{ inputs.skip-publish != true && inputs.skip-cnspec-bump != true && inputs.make-latest != false }}
231+
if: ${{ steps.skip-publish.outputs.skip-publish != 'true' && (github.event_name == 'push' || (inputs.skip-cnspec-bump != true && inputs.make-latest != false)) }}
232232
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
233233
with:
234234
token: ${{ secrets.RELEASR_ACTION_TOKEN }}

0 commit comments

Comments
 (0)