Skip to content

Commit a84a490

Browse files
ci: skip release/publish/changelog automation on forks (#5756)
nightly-release-v3, publish-npm, auto-changelog-v3 and changelog-v3 had no repository guard, so any fork with Actions enabled runs them against its own default branch. On a fork whose master is a PR head (#5462) this keeps committing fork-generated release bumps, npm version bumps and typedoc output (with fork source links) straight into the open PR. Guard the jobs with github.repository == 'wailsapp/wails', matching weekly-release-v2 and generate-sponsor-image. Co-authored-by: taliesin-ai <lea.anthony@gmail.com>
1 parent 1961c27 commit a84a490

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/auto-changelog-v3.yml

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

1414
jobs:
1515
auto-changelog:
16-
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
16+
if: github.repository == 'wailsapp/wails' && (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch')
1717
runs-on: ubuntu-latest
1818
env:
1919
GOWORK: "off"

.github/workflows/changelog-v3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
jobs:
1616
validate:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'wailsapp/wails'
1819
env:
1920
GOWORK: "off"
2021
permissions:

.github/workflows/nightly-release-v3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
jobs:
2020
nightly-release:
2121
runs-on: ubuntu-latest
22+
if: github.repository == 'wailsapp/wails'
2223
env:
2324
GOWORK: "off"
2425

.github/workflows/publish-npm.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
jobs:
1414
detect:
1515
name: Detect committed changes
16-
if: github.event_name != 'workflow_dispatch'
16+
if: github.repository == 'wailsapp/wails' && github.event_name != 'workflow_dispatch'
1717
outputs:
1818
changed: ${{ steps.package-json-changes.outputs.any_modified == 'true' || steps.source-changes.outputs.any_modified == 'true' }}
1919
runs-on: ubuntu-latest
@@ -50,7 +50,8 @@ jobs:
5050
name: Rebuild and publish
5151
needs: [detect]
5252
if: >-
53-
!failure() && !cancelled()
53+
github.repository == 'wailsapp/wails'
54+
&& !failure() && !cancelled()
5455
&& (github.event_name == 'workflow_dispatch' || needs.detect.outputs.changed == 'true')
5556
runs-on: ubuntu-latest
5657
permissions:

0 commit comments

Comments
 (0)