Skip to content

Commit

Permalink
Merge pull request #31 from nowsprinting/chore/fix_workflows_for_publ…
Browse files Browse the repository at this point in the history
…ic_fork

Fix skip jobs that cannot be running on fork
  • Loading branch information
nowsprinting authored Jan 20, 2024
2 parents 8daf1fd + 5105e3a commit 4b0cc07
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 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.
1 change: 1 addition & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

jobs:
release-drafter:
if: github.repository_owner == 'nowsprinting' # Skip on forked repo
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -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/[email protected]
Expand Down

0 comments on commit 4b0cc07

Please sign in to comment.