Replace skip-check action with concurrency check
This commit is contained in:
parent
4deb6fad8f
commit
350fb22fe3
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@ -13,6 +13,10 @@ on:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
python-version: '3.12'
|
||||
|
||||
@ -20,27 +24,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
skip-check:
|
||||
permissions:
|
||||
actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
|
||||
contents: read # for fkirc/skip-duplicate-actions to read and compare commits
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
|
||||
with:
|
||||
concurrent_skipping: 'same_content'
|
||||
do_not_skip: '["release", "workflow_dispatch", "schedule"]'
|
||||
lint:
|
||||
needs: skip-check
|
||||
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@ -67,7 +51,6 @@ jobs:
|
||||
|
||||
build:
|
||||
needs: lint
|
||||
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
Loading…
x
Reference in New Issue
Block a user