Skip to content

Commit 1c8415d

Browse files
Merge pull request #91 from openforcefield/dispatch_pr_open_workflow
Fix pr number in workflow dispatch
2 parents 2975596 + 0f9305e commit 1c8415d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/cookbook_pr_opened.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ defaults:
1717
run:
1818
shell: bash -l {0}
1919

20+
env:
21+
PR_NUMBER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pr_number || github.event.number }}
22+
2023
jobs:
2124
preprocess:
2225
runs-on: ubuntu-latest
@@ -33,11 +36,12 @@ jobs:
3336
run: |
3437
git config user.name github-actions
3538
git config user.email [email protected]
36-
git push origin HEAD:_cookbook_data_PR${{ github.event.number }}
39+
git push origin HEAD:_cookbook_data_PR${{ env.PR_NUMBER }}
3740
3841
- name: Add descriptive comment to PR
3942
uses: thollander/actions-comment-pull-request@v3
4043
with:
44+
pr-number: ${{ env.PR_NUMBER }}
4145
message: >
4246
This repository caches data generated from notebooks stored in other
4347
repositories in the `_cookbook_data_*` branches. Regenerating this
@@ -60,6 +64,7 @@ jobs:
6064
uses: thollander/actions-comment-pull-request@v3
6165
if: failure() && steps.copyCache.outcome == 'failure'
6266
with:
67+
pr-number: ${{ env.PR_NUMBER }}
6368
message: >
6469
This repository caches data generated from notebooks stored in other
6570
repositories in the `_cookbook_data_*` branches. Regenerating this

0 commit comments

Comments
 (0)