Skip to content

Commit 9c5d762

Browse files
committed
fix(ci): failed to find PR context
1 parent af21432 commit 9c5d762

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ jobs:
122122
if: ${{ steps.build.outcome == 'success' }}
123123
uses: actions/upload-artifact@v6
124124
with:
125-
name: ${{ env.ARTIFACT_X86 }}
126-
path: ${{ env.ARTIFACT_X86 }}
125+
name: ${{ steps.create-artifacts.outputs.ARTIFACT_X86 }}
126+
path: ${{ steps.create-artifacts.outputs.ARTIFACT_X86 }}
127127
if-no-files-found: error
128128

129129
- name: Save cached cargo dependencies

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ jobs:
1616
MESSAGE_FILE: ./message.md
1717
steps:
1818
- name: Check if in PR
19-
uses: insurgent-lab/is-in-pr-action@v0.2.0
20-
id: is-pr
19+
id: pr-number
20+
run: |
21+
pr_number=$(gh pr view --json number -q .number || echo '')
22+
echo "PR_NUMBER=$pr_number" >> $GITHUB_OUTPUT
2123
2224
- name: Create PR comment
2325
id: create-comment
24-
if: ${{ steps.is-pr.outputs.result == 'true' }}
26+
if: ${{ steps.pr-number.outputs.PR_NUMBER != '' }}
2527
run: |
2628
function outcome_emoji() {
2729
if [ "$1" == "success" ]; then
@@ -59,3 +61,4 @@ jobs:
5961
comment-tag: bot_comment
6062
mode: recreate
6163
file-path: ${{ env.MESSAGE_FILE }}
64+
pr-number: ${{ steps.pr-number.outputs.PR_NUMBER }}

0 commit comments

Comments
 (0)