diff --git a/.github/workflows/A.yml b/.github/workflows/A.yml new file mode 100644 index 0000000..91a41c6 --- /dev/null +++ b/.github/workflows/A.yml @@ -0,0 +1,15 @@ +name: A +on: + push: + +concurrency: + group: foo + cancel-in-progress: true + +jobs: + job: + name: A + runs-on: ubuntu-latest + steps: + - name: Sleep + run: sleep 20 diff --git a/.github/workflows/B.yml b/.github/workflows/B.yml new file mode 100644 index 0000000..bd8771b --- /dev/null +++ b/.github/workflows/B.yml @@ -0,0 +1,15 @@ +name: B +on: + push: + +concurrency: + group: foo + cancel-in-progress: true + +jobs: + job: + name: B + runs-on: ubuntu-latest + steps: + - name: Sleep + run: sleep 20 diff --git a/.github/workflows/C.yml b/.github/workflows/C.yml new file mode 100644 index 0000000..8b6b878 --- /dev/null +++ b/.github/workflows/C.yml @@ -0,0 +1,53 @@ +name: C +on: + push: + +jobs: + job1: + name: C1 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + job2: + name: C2 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + job3: + name: C3 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + job4: + name: C4 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + jobX: + name: matrix ${{matrix.n}} + runs-on: ubuntu-latest + strategy: + matrix: + n: [ 1, 2, 3, 4 ] + concurrency: + group: CM + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb919b2..3cb3960 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,14 @@ name: Test on: - pull_request_target: - branches: [ '🙄' ] + pull_request: push: - tags: [ testtag ] - jobs: job: - name: Test + name: Test expressions runs-on: ubuntu-latest steps: - - name: Env - run: env - - name: Event data - run: cat $GITHUB_EVENT_PATH + - name: Expr + env: + XXX: build-${{ github.event_name == 'push' && github.run_id || 'pr' }}-${{ github.ref }} + run: echo "$XXX"