Skip to content

Commit

Permalink
Merge pull request #773 from ACCESS-NRI/fix-auto-merge
Browse files Browse the repository at this point in the history
Thanks for the review @heidinett
  • Loading branch information
atteggiani authored Sep 9, 2024
2 parents 1f40857 + c332fd7 commit e8398fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/automatic_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ on:
- cron: "9 17 * * SUN"

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- name: Check links
uses: ./.github/workflows/check_links.yml

auto-merge:
runs-on: ubuntu-latest
permissions:
contents: write
# needs: check-links
steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@master
with:
ref: main
ref: main
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}

- name: Import GPG settings
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
Expand All @@ -32,6 +38,7 @@ jobs:

- name: Merge development to main
run: |
git config --list
git merge --no-ff -X theirs origin/development -m "Automatically merge 'development' to 'main'.
Merge commit issued by the automatic_merge workflow."
git push origin main
16 changes: 6 additions & 10 deletions .github/workflows/check_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,24 @@ on:
- opened
- reopened
- synchronize
schedule:
# Run every Monday at 03:07 (AEDT)
# AEDT is UTC+10 --> Monday at 03:07 AEDT is Sunday at 17:07 UTC
- cron: "7 17 * * SUN"
workflow_dispatch:
workflow_call:

jobs:
link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout main repo
if: ${{github.event_name == 'schedule'}}
if: ${{github.event_name == 'pull_request'}}
uses: actions/checkout@master
with:
ref: main

- name: Checkout repo
if: ${{github.event_name != 'schedule'}}
if: ${{github.event_name != 'pull_request'}}
uses: actions/checkout@master
with:
ref: main

- name: Link checker
uses: lycheeverse/[email protected]
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 #v1.10.0
with:
fail: true
args: --config .github/workflows/lychee-config.toml './docs/**/*.md' './docs/**/*.html'

0 comments on commit e8398fd

Please sign in to comment.