Skip to content

Commit

Permalink
ci: replace cancel step with native concurrency pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Mar 1, 2024
1 parent 590d3bd commit 5b082ee
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ on: [push, pull_request]
permissions:
contents: read

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
tests:
runs-on: ${{ matrix.platform }}
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -43,7 +38,6 @@ jobs:

go-lint:
runs-on: ubuntu-latest
needs: [setup]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down

0 comments on commit 5b082ee

Please sign in to comment.