Skip to content

Commit

Permalink
add concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
ermirizio authored Sep 4, 2024
1 parent 72fdb80 commit 8fc5559
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/concurrency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is a basic workflow to help you get started with Actions

name: Concurrency test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
run: ["run1", "run2"]

steps:
- name: Environment Read
run: |
echo "GITHUB.REF ${{ github.ref }}"
echo "GITHUB.WORKFLOW ${{ github.workflow }}"
echo "GITHUB.HEAD ${{ github.head }}"
- name: Sleep 600 - ${{ matrix.run }}
run: sleep 600


3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ jobs:
env:
BASE_REF: "DEFAULT"
steps:
- name: Sleep 700 - ${{ matrix.run }}
run: sleep 700

- name: env Read
run: echo "BASE REF ${BASE_REF}"

Expand Down

0 comments on commit 8fc5559

Please sign in to comment.