Skip to content

Commit 2e51c1a

Browse files
Fix workflow after testing it
1 parent 54a03c8 commit 2e51c1a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/cli-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ jobs:
116116
needs: [cli-test]
117117
if: failure() && github.ref == 'refs/heads/main'
118118
permissions:
119+
contents: read
119120
issues: write
121+
env:
122+
GH_TOKEN: ${{ github.token }}
120123
steps:
121124
- name: Create GitHub issue
122125
run: |
@@ -141,7 +144,7 @@ jobs:
141144
142145
COMMENT_FILE="comment.md"
143146
RUN_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
144-
printf 'CLI test [%s](%s) failed on ref `%s`' "$RUN_ID" "$RUN_URL" "$RUN_REF" > "$COMMENT_FILE"
147+
printf 'CLI test [%s](%s) failed on ref `%s`' "$GITHUB_RUN_ID" "$RUN_URL" "$GITHUB_REF" > "$COMMENT_FILE"
145148
146149
# `gh issue create` returns an issue URL, and `gh issue list | cut -f 1` returns an issue number.
147150
# Both are accepted here.

0 commit comments

Comments
 (0)