Skip to content

Commit

Permalink
Streamline GitHub Actions Runs
Browse files Browse the repository at this point in the history
- Don't double run (For both PR and Push to any branch)
- Cancel if a new Run starts
  • Loading branch information
omad committed Dec 2, 2024
1 parent 60bae9e commit edd03af
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/doc-qa.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
name: Doc QA

on:
# Triggers the workflow on pull request events for the main branch
pull_request_target:
push:
branches:
- main
- develop
- develop-1.9
pull_request:
branches:
- develop
- develop-1.9

concurrency:
# Here the group is defined by the head_ref of the PR
group: ${{ github.head_ref }}
# Here we specify that we'll cancel any "in progress" workflow of the same group. Thus if we push, ammend a commit and push
# again the previous workflow will be cancelled, thus saving us github action build minutes and avoid any conflicts
cancel-in-progress: true

jobs:
doctor-rst:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
- develop
- develop-1.9
pull_request:
branches:
- develop
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/test-conda-build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
name: Conda Smoke Test

on:
push:
branches:
- main
- develop
- develop-1.9
pull_request:
paths:
- '**'
branches:
- develop
- develop-1.9

push:
paths:
- '**'
concurrency:
# Here the group is defined by the head_ref of the PR
group: ${{ github.head_ref }}
# Here we specify that we'll cancel any "in progress" workflow of the same group. Thus if we push, ammend a commit and push
# again the previous workflow will be cancelled, thus saving us github action build minutes and avoid any conflicts
cancel-in-progress: true

jobs:
check-conda:
Expand Down

0 comments on commit edd03af

Please sign in to comment.