diff --git a/.github/workflows/happy-new-year.yml b/.github/workflows/happy-new-year.yml index 58ff9041fc..2e36842916 100644 --- a/.github/workflows/happy-new-year.yml +++ b/.github/workflows/happy-new-year.yml @@ -28,7 +28,7 @@ jobs: update-year-in-test: runs-on: ubuntu-latest # Don't run the cron job on forks. - if: ${{ github.event_name != 'schedule' || github.repository == 'PHPCSStandards/PHP_CodeSniffer' }} + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} name: "Happy New Year" steps: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f898515291..3bc0ebe7eb 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest # Don't run the cronjob in this workflow on forks. - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} steps: - name: Checkout code @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest # Don't run the cronjob in this workflow on forks. - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} steps: - name: Checkout code @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest # Don't run the cronjob in this workflow on forks. - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} env: XMLLINT_INDENT: ' ' @@ -131,7 +131,7 @@ jobs: yamllint: name: 'Lint Yaml' # Don't run the cronjob in this workflow on forks. - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main with: @@ -140,13 +140,13 @@ jobs: markdownlint: name: 'Lint Markdown' # Don't run the cronjob in this workflow on forks. - if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + 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_name == 'schedule' && github.repository_owner == 'PHPCSStandards') + if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }} uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main