Skip to content

Commit 400ac24

Browse files
authored
CI: make release workflows fork-friendly (#1889)
1 parent e508091 commit 400ac24

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.github/workflows/bumpversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
bump-version:
10-
if: "!startsWith(github.event.head_commit.message, 'bump:')"
10+
if: ${{ github.repository == 'commitizen-tools/commitizen' && !startsWith(github.event.head_commit.message, 'bump:') }}
1111
runs-on: ubuntu-latest
1212
name: "Bump version and create changelog with commitizen"
1313
steps:

.github/workflows/docspublish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
update-cli-screenshots:
11+
if: ${{ github.repository == 'commitizen-tools/commitizen' }}
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v6
@@ -46,6 +47,7 @@ jobs:
4647
fi
4748
4849
publish-documentation:
50+
if: ${{ github.repository == 'commitizen-tools/commitizen' }}
4951
runs-on: ubuntu-latest
5052
needs: update-cli-screenshots
5153
steps:

.github/workflows/homebrewpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
deploy:
1111
runs-on: macos-latest
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12+
if: ${{ github.repository == 'commitizen-tools/commitizen' && github.event.workflow_run.conclusion == 'success' }}
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v6
@@ -23,7 +23,7 @@ jobs:
2323
- name: Update Homebrew formula
2424
uses: dawidd6/action-homebrew-bump-formula@v7
2525
with:
26-
token: ${{secrets.PERSONAL_ACCESS_TOKEN}}
26+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2727
formula: commitizen
2828
tag: v${{ env.project_version }}
2929
force: true

.github/workflows/pythonpublish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
deploy:
10+
if: ${{ github.repository == 'commitizen-tools/commitizen' }}
1011
runs-on: ubuntu-latest
1112
permissions:
1213
id-token: write

0 commit comments

Comments
 (0)