diff --git a/.github/workflows/validate-cron.yml b/.github/workflows/validate-cron.yml new file mode 100644 index 0000000000..c2c8f73167 --- /dev/null +++ b/.github/workflows/validate-cron.yml @@ -0,0 +1,27 @@ +name: Validate Cronjob + +on: + # Run this workflow every Monday at 6:00 (to make sure the broken link check runs regularly). + schedule: + - cron: '0 6 * * 1' + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + markdownlint: + name: 'Lint Markdown' + # Don't run the cronjob in this workflow on forks. + if: ${{ github.event.repository.fork == false }} + + uses: PHPCSStandards/.github/.github/workflows/reusable-markdownlint.yml@main + + remark: + name: 'QA Markdown' + # Don't run the cronjob in this workflow on forks. + if: ${{ github.event.repository.fork == false }} + + uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6791eee7f3..6038af7f4c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -4,9 +4,6 @@ on: # Run on all pushes and on all pull requests. push: pull_request: - # Also run this workflow every Monday at 6:00 (to make sure the broken link check runs regularly). - schedule: - - cron: '0 6 * * 1' # Allow manually triggering the workflow. workflow_dispatch: @@ -21,9 +18,6 @@ jobs: name: Check PHP code style runs-on: ubuntu-latest - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - steps: - name: Checkout code uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -47,9 +41,6 @@ jobs: name: Check XML files runs-on: ubuntu-latest - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - steps: - name: Checkout code uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -91,9 +82,6 @@ jobs: name: 'XML Code style' runs-on: ubuntu-latest - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - env: XMLLINT_INDENT: ' ' @@ -130,25 +118,16 @@ jobs: yamllint: name: 'Lint Yaml' - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main with: strict: true markdownlint: name: 'Lint Markdown' - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - uses: PHPCSStandards/.github/.github/workflows/reusable-markdownlint.yml@main remark: name: 'QA Markdown' - # Don't run the cronjob in this workflow on forks. - if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} - uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main shellcheck: