security(release): prevent upstream package publication from the storefront fork
davoodmehraban89 committed
Oct 14, 2026 at 23:23 UTC
33210ad325473c86f942fafab4e80045d6eb224c
1 file changed
+8
-5
.github/workflows/trigger-release.yml
+8
-5
@@ -49,8 +49,9 @@ jobs:
49
check:
50
name: Check if latest release is running
51
if: |
52
- github.event_name == 'release' ||
53
- (github.event_name == 'workflow_dispatch' && github.event.inputs.version != 'latest')
52
+ github.repository == 'medusajs/medusa' &&
53
+ (github.event_name == 'release' ||
54
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.version != 'latest'))
55
runs-on: ubuntu-latest
56
outputs:
57
release_running: ${{ steps.check_release.outputs.release_running }}
@@ -79,7 +80,7 @@ jobs:
80
release:
81
name: Trigger ${{ github.event.inputs.version || 'preview' }} Release
82
needs: check
82
- if: needs.check.outputs.release_running != 'true'
83
+ if: github.repository == 'medusajs/medusa' && needs.check.outputs.release_running != 'true'
84
runs-on: ubuntu-latest
85
steps:
86
- name: Checkout Repo
@@ -181,8 +182,9 @@ jobs:
182
latest:
183
name: Version packages PR
184
if: |
184
- github.event_name == 'push' ||
185
- (github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'latest')
185
+ github.repository == 'medusajs/medusa' &&
186
+ (github.event_name == 'push' ||
187
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'latest'))
188
runs-on: ubuntu-latest
189
permissions:
190
contents: write
@@ -234,6 +236,7 @@ jobs:
236
snapshot:
237
name: Dispatch Snapshot Release
238
if: |
239
+ github.repository == 'medusajs/medusa' &&
240
github.event.issue.pull_request &&
241
github.event.comment.body == '/snapshot-this'
242
runs-on: ubuntu-latest