Skip to content

Commit cc3a0d7

Browse files
authored
fix: Updates workflows to use workflow_dispatch. (#387)
1 parent 585b2da commit cc3a0d7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/dist-pr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
name: Create release PR for dist
1616

1717
on:
18-
push:
19-
branches:
20-
- temp-build-branch
18+
workflow_dispatch:
2119

2220
jobs:
2321
create-pr:
2422
runs-on: ubuntu-latest
23+
permissions:
24+
pull-requests: write
25+
contents: write
2526
steps:
2627
- name: Checkout code
2728
uses: actions/checkout@v3

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,11 @@ jobs:
7676
fi
7777
git commit -m "Update dist folder [skip ci]"
7878
git push --force origin temp-build-branch
79+
80+
- name: Trigger Create Release Workflow
81+
uses: benc-uk/workflow-dispatch@v1
82+
with:
83+
workflow: 'Create release PR for dist'
84+
ref: 'temp-build-branch'
85+
token: ${{ secrets.GH_MERGE_TOKEN }} # Use the same token that pushed, it needs 'workflows: write' permissions
86+
inputs: '{ "source_run_id": "${{ github.run_id }}" }' # Optional: Pass the run ID for traceability

0 commit comments

Comments
 (0)