I would like to limit concurrency to one run for my workflow:
on:
pull_request:
paths:
- 'foo/**'
push:
paths:
- 'foo/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
However, I found out that for push head_ref is empty and run_id is always unique (as described here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value)
How I can create a concurrency key that will be constant across pull_request and push events?