From a8e4d2782e78fc25a8b0d255b03c1acdc4665d64 Mon Sep 17 00:00:00 2001 From: mahdi-robbani Date: Wed, 7 Feb 2024 15:09:12 +0100 Subject: [PATCH] update job scheduling --- .github/workflows/bad-link-reporter.yml | 19 ++++++++++++++++--- .github/workflows/lint-md.yml | 14 ++++++++++++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bad-link-reporter.yml b/.github/workflows/bad-link-reporter.yml index 070db30b..22ccdf03 100644 --- a/.github/workflows/bad-link-reporter.yml +++ b/.github/workflows/bad-link-reporter.yml @@ -23,13 +23,26 @@ env: # Optional file containing a list of URLs to ignore, one per line: ignore: .github/workflows/ignored-urls.txt +# on: +# schedule: # Cron syntax is: "min hr day-of-month month day-of-week" +# - cron: 00 04 * * 1 +# push: +# paths: ['**.md'] +# workflow_dispatch: +# NOTE: Currently running on every push, change to schedule after the sprint on: - schedule: # Cron syntax is: "min hr day-of-month month day-of-week" - - cron: 00 04 * * 1 + # Runs on pushes targeting the default branch push: - paths: ['**.md'] + branches: ["main"] + + # Run on pull request + pull_request: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + # The rest of this file should be left as-is ───────────────────────── run-name: Test links in Markdown files diff --git a/.github/workflows/lint-md.yml b/.github/workflows/lint-md.yml index 8966a1c4..54572641 100644 --- a/.github/workflows/lint-md.yml +++ b/.github/workflows/lint-md.yml @@ -1,6 +1,16 @@ -# Lint all markdown files +name: Lint Markdown file -on: [push, pull_request] +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Run on pull request + pull_request: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: # Lint Markdown file job