potiuk commented on pull request #12729: URL: https://github.com/apache/beam/pull/12729#issuecomment-683273796
Actually - since (I believe) you want to run it also for fork pull request, you do not need all those. All these cancels should be replaced by one single workflow to cancel them all, triggered by 'workflow_run event'. Otherwise your cancel jobs will have no permission to cancel the duplicates. It should follow exactly the example here: https://github.com/potiuk/cancel-workflow-runs#cancel-duplicate-runs-for-the-source-workflow There is enough to have one "workflow_run" triggered by all the different workflows you have. You just need something like this as separate "Cancelling" workflow. Then you can remove all other cancels: ``` name: Cancelling on: workflow_run: workflows: - "Build python source distribution and wheels" - "Java Tests" - "Python tests" types: ['requested'] jobs: cancel-duplicate-workflow-runs: name: "Cancel duplicate workflow runs" runs-on: ubuntu-latest steps: - uses: potiuk/cancel-workflow-runs@v2 name: "Cancel duplicate workflow runs" with: cancelMode: duplicates token: ${{ secrets.GITHUB_TOKEN }} sourceRunId: ${{ github.event.workflow_run.id }} ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
