From fee24539ac2d8158a1927c50e930c08706e1c70b Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Mon, 15 Feb 2021 06:09:51 +0000 Subject: [PATCH] Add a GitHub Action to cancel previous runs (#2180) ## Issue Addressed It takes over 20 minutes to run the GitHub Workflow for lighthouse. It would be time-saving to cancel previous runs. ## Proposed Changes Added [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) to our workflow. I've configured the action according to [Advanced settings](https://github.com/styfle/cancel-workflow-action#advanced). --- .github/workflows/cancel-previous-runs.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/cancel-previous-runs.yml diff --git a/.github/workflows/cancel-previous-runs.yml b/.github/workflows/cancel-previous-runs.yml new file mode 100644 index 0000000000..b7a3cd0b46 --- /dev/null +++ b/.github/workflows/cancel-previous-runs.yml @@ -0,0 +1,14 @@ +name: cancel previous runs +on: [push] +jobs: + cancel: + name: 'Cancel Previous Runs' + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + # https://github.com/styfle/cancel-workflow-action/releases + - uses: styfle/cancel-workflow-action@514c783 # 0.7.0 + with: + # https://api.github.com/repos/sigp/lighthouse/actions/workflows + workflow_id: 697364,2434944,4462424,308241,2883401,316 + access_token: ${{ github.token }}