diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 796bdeb..c0e07ae 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -39,4 +39,4 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.repository_owner == 'nowsprinting' # Skip on public fork, because can not read secrets. + if: failure() && github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets. diff --git a/.github/workflows/metacheck.yml b/.github/workflows/metacheck.yml index 605ebfd..3aaed99 100644 --- a/.github/workflows/metacheck.yml +++ b/.github/workflows/metacheck.yml @@ -34,4 +34,4 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.repository_owner == 'nowsprinting' # Skip on public fork, because can not read secrets. + if: failure() && github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets. diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 0acb52d..40b65af 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -9,6 +9,7 @@ on: jobs: pr-labeler: + if: github.event.pull_request.head.repo.fork == false # Skip on public fork runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 5a2bec9..eeb06fe 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -15,6 +15,7 @@ concurrency: jobs: release-drafter: + if: github.repository_owner == 'nowsprinting' # Skip on forked repo runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4f279d..36fda93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ on: jobs: check-bump-version: + if: github.repository_owner == 'nowsprinting' # Skip on forked repo runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b148d0..f292593 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,7 @@ concurrency: jobs: test: + if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets. runs-on: ubuntu-latest permissions: contents: read @@ -115,10 +116,10 @@ jobs: notify: needs: test + if: github.event.pull_request.head.repo.fork == false # Skip on public fork, because can not read secrets. runs-on: ubuntu-latest permissions: actions: read - if: always() steps: - uses: Gamesight/slack-workflow-status@v1.2.0