From c332fd75297beb8b588dd986464ca9283d6d2453 Mon Sep 17 00:00:00 2001 From: Davide Marchegiani Date: Mon, 9 Sep 2024 11:41:32 +1000 Subject: [PATCH] Added check links as requirement for auto-merge --- .github/workflows/automatic_merge.yml | 8 +++++++- .github/workflows/check_links.yml | 14 +++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/automatic_merge.yml b/.github/workflows/automatic_merge.yml index b8384e3d2..936a0b5c1 100644 --- a/.github/workflows/automatic_merge.yml +++ b/.github/workflows/automatic_merge.yml @@ -5,11 +5,17 @@ on: # Run every Monday at 03:09 (AEDT) # AEDT is UTC+10 --> Monday at 03:09 AEDT is Sunday at 17:09 UTC - cron: "9 17 * * SUN" - push: jobs: + check-links: + runs-on: ubuntu-latest + steps: + - name: Check links + uses: ./.github/workflows/check_links.yml + auto-merge: runs-on: ubuntu-latest + # needs: check-links steps: - name: Checkout repo uses: actions/checkout@master diff --git a/.github/workflows/check_links.yml b/.github/workflows/check_links.yml index 074cfbe84..a29e3ee67 100644 --- a/.github/workflows/check_links.yml +++ b/.github/workflows/check_links.yml @@ -6,25 +6,21 @@ 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/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 #v1.10.0