Skip to content

Commit

Permalink
ci: accommodate master/develop branch split (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Aug 8, 2023
1 parent 3d54a42 commit 4afd7f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ex-rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
push:
branches: [ master, develop ]
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'DEVELOPER.md'
pull_request:
branches: [ master, develop ]
branches:
- master
- develop

jobs:
rtd_build:
Expand Down Expand Up @@ -116,7 +120,7 @@ jobs:
needs: rtd_build
runs-on: ubuntu-latest

if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' && github.ref_name == 'master'
steps:
- name: Checkout MODFLOW6 examples repo
uses: actions/checkout@v3
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ex-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
push:
branches: [ master, develop ]
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'DEVELOPER.md'
pull_request:
branches: [ master, develop ]
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'DEVELOPER.md'
Expand Down Expand Up @@ -241,13 +245,13 @@ jobs:
ls -l .
- name: Delete the latest release
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' && github.ref_name == 'master'
uses: ame-yu/action-delete-latest-release@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create/Update the current release
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' && github.ref_name == 'master'
uses: ncipollo/release-action@v1
with:
tag: current
Expand All @@ -258,7 +262,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload MODFLOW 6 examples to the current GitHub release
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' && github.ref_name == 'master'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -268,7 +272,7 @@ jobs:
file_glob: true

- name: Delete all Artifacts
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' && github.ref_name == 'master'
uses: GeekyEggo/delete-artifact@v2
with:
name: |
Expand Down

0 comments on commit 4afd7f1

Please sign in to comment.