Merge pull request #1648 from github/cklin/update-bundle-trigger

Fix pre-release trigger for update-bundle action
This commit is contained in:
Chuan-kai Lin 2023-04-14 15:11:42 -07:00 committed by GitHub
commit be2b53b5c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,11 +2,20 @@ name: Update default CodeQL bundle
on:
release:
types: [prereleased]
# From https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
# Note: The prereleased type will not trigger for pre-releases published
# from draft releases, but the published type will trigger. If you want a
# workflow to run when stable and pre-releases publish, subscribe to
# published instead of released and prereleased.
#
# From https://github.com/orgs/community/discussions/26281
# As a work around, in published type workflow, you could add if condition
# to filter pre-release attribute.
types: [published]
jobs:
update-bundle:
if: startsWith(github.event.release.tag_name, 'codeql-bundle-')
if: github.event.release.prerelease && startsWith(github.event.release.tag_name, 'codeql-bundle-')
runs-on: ubuntu-latest
steps:
- name: Dump environment