diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 155b091..76299f3 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 fd52c8a..9e50198 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 0ae58cb..fbcdd1c 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 0bbceb6..87420c8 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 4a6d96b..0eb9a0f 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 2035603..cb65fdd 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 @@ -114,10 +115,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