Skip to content

Commit be2b53b

Browse files
authored
Merge pull request #1648 from github/cklin/update-bundle-trigger
Fix pre-release trigger for update-bundle action
2 parents dc04638 + ae24b75 commit be2b53b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/update-bundle.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@ name: Update default CodeQL bundle
22

33
on:
44
release:
5-
types: [prereleased]
5+
# From https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
6+
# Note: The prereleased type will not trigger for pre-releases published
7+
# from draft releases, but the published type will trigger. If you want a
8+
# workflow to run when stable and pre-releases publish, subscribe to
9+
# published instead of released and prereleased.
10+
#
11+
# From https://github.com/orgs/community/discussions/26281
12+
# As a work around, in published type workflow, you could add if condition
13+
# to filter pre-release attribute.
14+
types: [published]
615

716
jobs:
817
update-bundle:
9-
if: startsWith(github.event.release.tag_name, 'codeql-bundle-')
18+
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
1019
runs-on: ubuntu-latest
1120
steps:
1221
- name: Dump environment

0 commit comments

Comments
 (0)