Skip to content

Commit

Permalink
build: prevent external forks from publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
clementnuss authored Nov 30, 2021
1 parent 356d806 commit b0754ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
run: ct install --target-branch=main --chart-dirs=deploy/charts

publish-tagged:
if: "startsWith(github.ref, 'refs/tags/v') && github.repository == 'postfinance/kubelet-csr-approver'"
if: "startsWith(github.ref, 'refs/tags/v') && ${{ !github.event.pull_request.head.repo.fork }}"
needs:
- lint
- test
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

publish-untagged:
if: "!startsWith(github.ref, 'refs/tags/v') && github.repository == 'postfinance/kubelet-csr-approver'"
if: "!startsWith(github.ref, 'refs/tags/v') && ${{ !github.event.pull_request.head.repo.fork }}"
needs:
- lint
- test
Expand Down

0 comments on commit b0754ed

Please sign in to comment.