From 495749b2538bd2263f99405023ade9878a7d2fca Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Wed, 26 Jan 2022 16:41:55 +0100 Subject: [PATCH 1/2] Cancel running actions on branch --- .github/workflows/codeql-analysis.yml | 4 ++++ .github/workflows/develop-image.yml | 8 ++++++++ .github/workflows/feature-image.yml | 8 ++++++++ .github/workflows/redhat-image.yml | 4 ++++ .github/workflows/release-image.yml | 8 ++++++++ .github/workflows/test-build.yml | 12 ++++++++++++ 6 files changed, 44 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 146f39b7..113ed489 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,6 +38,10 @@ jobs: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout repository uses: actions/checkout@v2 diff --git a/.github/workflows/develop-image.yml b/.github/workflows/develop-image.yml index 3b53f9ec..582e208e 100644 --- a/.github/workflows/develop-image.yml +++ b/.github/workflows/develop-image.yml @@ -14,6 +14,10 @@ jobs: runs-on: ubuntu-latest name: Publish container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Login to container registry @@ -30,6 +34,10 @@ jobs: runs-on: ubuntu-latest name: Publish manifests container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Login to container registry diff --git a/.github/workflows/feature-image.yml b/.github/workflows/feature-image.yml index 181babd3..d5091c7f 100644 --- a/.github/workflows/feature-image.yml +++ b/.github/workflows/feature-image.yml @@ -18,6 +18,10 @@ jobs: runs-on: ubuntu-latest name: Publish container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Login to container registry @@ -34,6 +38,10 @@ jobs: runs-on: ubuntu-latest name: Publish manifests container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Login to container registry diff --git a/.github/workflows/redhat-image.yml b/.github/workflows/redhat-image.yml index db7f3efc..f85b07a4 100644 --- a/.github/workflows/redhat-image.yml +++ b/.github/workflows/redhat-image.yml @@ -16,6 +16,10 @@ jobs: runs-on: ubuntu-latest name: Publish image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 with: diff --git a/.github/workflows/release-image.yml b/.github/workflows/release-image.yml index bff666e6..26b5d7cb 100644 --- a/.github/workflows/release-image.yml +++ b/.github/workflows/release-image.yml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-latest name: Publish container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Set image tag env var @@ -43,6 +47,10 @@ jobs: runs-on: ubuntu-latest name: Publish manifests container image steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Login to container registry diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index b71911f0..b3ad9b74 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -10,6 +10,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - uses: actions/checkout@v2 - name: Run golangci-lint uses: golangci/golangci-lint-action@v2.3.0 @@ -20,6 +24,10 @@ jobs: name: Run tests and build runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: @@ -35,6 +43,10 @@ jobs: name: Build container image runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 - name: Build container image From 9b61a5c034a9b90dc82660d753c08c33f79810bb Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Wed, 26 Jan 2022 21:11:55 +0100 Subject: [PATCH 2/2] Fix yaml lint --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 113ed489..1332a32e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,9 +39,9 @@ jobs: steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} - name: Checkout repository uses: actions/checkout@v2