Skip to content

Commit 005d20d

Browse files
authored
Add condition to skip release and test release workflows from forks (#31)
* Add condition to skip release and test release workflows from forks * Add code comment to explain the condition in the GitHub workflows Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
1 parent 0ad6e95 commit 005d20d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
build:
2121
name: Build distribution 📦
22+
# Prevent this workflow from running on forks
23+
if: github.repository == 'django-commons/best-practices'
2224
runs-on: ubuntu-latest
2325

2426
steps:

.github/workflows/test_release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
# Tag name:
2828
# <version>.dev<yyyymmdd><iteration>
2929
name: Create dev version string
30+
# Prevent this workflow from running on forks
31+
if: github.repository == 'django-commons/best-practices'
3032
runs-on: ubuntu-latest
3133
outputs:
3234
dev_version: ${{ steps.output-dev-version.outputs.dev_version }}

0 commit comments

Comments
 (0)