I have a workflow which is calling a reusable workflow. This caller workflow is defined with
name: My CI Pipeline
on:
push:
branches: [ "master" ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
...
When I push changes in my repository the Action Runner starts the workflow and this calls a reusable workflow (which, in turn, calls a further reusable workflow, ...). Fine! If another push into the repository takes place the starting workflow gets interrupted. Fine! The problem: The called reusable workflow continues to run.
Because I rely on a value stored in a repository variable during processing the first reusable workflow I may run into problems. Hence, how can I stop all called workflows when the concurrency feature takes place?
At the end of the main workflow I have
run_build_wf:
needs: check_changes
if: needs.check_changes.outputs.changed_part_be == 'backend' || needs.check_changes.outputs.changed_part_fe == 'frontend'
uses: ./.github/workflows/build_workflow.yml
secrets: inherit
with:
changed_part_be: ${{needs.check_changes.outputs.changed_part_be}}
changed_part_fe: ${{needs.check_changes.outputs.changed_part_fe}}
Do I have to put some concurrency stuff in the called workflow?