mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
workflows: fix invalid usage of github.event_name
The condition was wrong because `github.event_name` will never be `labeled` since this field always refers to the actual type of the event, which in this case will always be `pull_request`. We need to determine which type of activity has triggered the workflow via the `github.event.action` context.
This commit is contained in:
parent
519da9cf75
commit
551a0f6fae
1 changed files with 6 additions and 1 deletions
7
.github/workflows/backbot.yml
vendored
7
.github/workflows/backbot.yml
vendored
|
|
@ -11,7 +11,12 @@ permissions: {}
|
|||
jobs:
|
||||
backbot:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository_owner == 'Icinga' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith(github.event.label.name, 'backport-to-support/')) }}
|
||||
if: |
|
||||
github.repository_owner == 'Icinga' &&
|
||||
github.event.pull_request.merged == true && (
|
||||
github.event.action != 'labeled' ||
|
||||
startsWith(github.event.label.name, 'backport-to-support/')
|
||||
)
|
||||
steps:
|
||||
- name: Generate GitHub Installation Access Token
|
||||
# Use GitHub App to generate an installation access token to allow PRs created by Backbot to trigger workflows.
|
||||
|
|
|
|||
Loading…
Reference in a new issue