Skip to content

Commit

Permalink
Fix skip jobs that cannot be running on fork
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Nov 18, 2023
1 parent 93ff091 commit 0929c22
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion .github/workflows/metacheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ${{ github.event.inputs.runner }}
permissions:
contents: read
Expand Down Expand Up @@ -86,10 +87,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/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -98,10 +99,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/[email protected]
Expand Down

0 comments on commit 0929c22

Please sign in to comment.