Skip to content

Commit

Permalink
Added on.create Trigger (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat authored Sep 6, 2024
1 parent 6749427 commit e8ac854
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI
run-name: CI (${{ github.event_name }}) for ${{ github.ref_name }}
on:
# For config-pr-1-ci.yml
pull_request:
branches:
- 'release-*'
Expand All @@ -13,29 +14,33 @@ on:
- config/**
- .*
- README.md
# For config-pr-2-confirm.yml
issue_comment:
types:
- created
- edited
# For config-pr-3-bump-tag.yml
create:
push:
branches:
- 'release-*'
paths:
- 'metadata.yaml'
issue_comment:
types:
- created
- edited

jobs:
pr:
name: PR
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && github.repository != 'ACCESS-NRI/model-configs-template'
uses: access-nri/model-config-tests/.github/workflows/config-pr-1-ci.yml@main
secrets: inherit
permissions:
contents: write
pull-requests: write # For pull request comments denoting failure of the workflow
checks: write
checks: write # For results of tests as a check

pr-comment:
name: Comment
if: github.event_name == 'issue_comment'
if: github.event_name == 'issue_comment' && github.repository != 'ACCESS-NRI/model-configs-template'
uses: access-nri/model-config-tests/.github/workflows/config-pr-2-confirm.yml@main
secrets: inherit
permissions:
Expand All @@ -44,7 +49,7 @@ jobs:

bump-tag:
name: Tag Bump
if: github.event_name == 'push'
if: (github.event_name == 'push' || github.event_name == 'create' && github.ref_type == 'branch' && startsWith(github.ref_name, 'release-')) && github.repository != 'ACCESS-NRI/model-configs-template'
uses: access-nri/model-config-tests/.github/workflows/config-pr-3-bump-tag.yml@main
secrets: inherit
permissions:
Expand Down

0 comments on commit e8ac854

Please sign in to comment.