Skip to content

Commit 2f9e378

Browse files
authored
chore: skip publish on forks (angular-eslint#1873)
1 parent 759f07d commit 2f9e378

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ jobs:
141141
permissions:
142142
id-token: write # needed for provenance data generation
143143
needs: [primary]
144-
if: github.ref == 'refs/heads/main'
144+
# prevents this action from running on forks
145+
if: (github.repository == 'angular-eslint/angular-eslint') && (github.ref == 'refs/heads/main')
145146
steps:
146147
- uses: actions/checkout@v4
147148
with:

.github/workflows/publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414

1515
jobs:
1616
publish:
17+
# prevents this action from running on forks
18+
if: github.repository == 'angular-eslint/angular-eslint'
1719
name: Publish to npm
1820
runs-on: ubuntu-latest
1921
permissions:

0 commit comments

Comments
 (0)