Skip to content

Commit

Permalink
ci: concurrency test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed May 15, 2024
1 parent 7ae94bb commit 4b501a2
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@ on:
workflow_dispatch:
inputs: # null for another event
skip:
type: choice
default: no
options:
- no
- workflow
- job
type: boolean
default: false
permissions: {}

concurrency:
group: ${{ github.workflow }}-workflow
cancel-in-progress: ${{ inputs.skip != 'job' }}
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
test1:
if: ${{ inputs.skip == 'false'}}
if: ${{ inputs.skip == false}}
runs-on: ubuntu-latest
steps:
- run: sleep 60
test2:
concurrency:
group: ${{ github.workflow }}-job
cancel-in-progress: true
if: ${{ inputs.skip != 'job'}}
runs-on: ubuntu-latest
steps:
- run: sleep 120

0 comments on commit 4b501a2

Please sign in to comment.