ci: bugfix cancelling only when push to master or workflow dispatch.

Otherwise don't let it cancel as it seems that when running with pull_request_target we are with ref pointing to target and thus the cancel condition was being met
This commit is contained in:
DevTekVE
2025-04-20 14:19:31 +02:00
parent d0c209575e
commit 9a1e420fa7
@@ -13,7 +13,7 @@ on:
- master
- master-new
pull_request_target:
types: [ synchronize, labeled ]
types: [ labeled ]
branches:
- 'master'
- 'master-new'
@@ -29,12 +29,15 @@ on:
required: true
default: 'master-dev-c3-new'
type: string
cancel_in_progress:
description: 'Cancel any in-progress runs of this workflow'
required: false
default: true
type: boolean
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
run-name: ${{ contains(github.event_name, 'pull_request') && github.event.action == 'synchronize' && format('{0} - {1}', github.workflow, github.event.action) || format('{0} - {1}', github.workflow, github.event_name) }}
cancel-in-progress: ${{ inputs.cancel_in_progress || github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
jobs:
reset-and-squash: