Fix workflow after testing it

This commit is contained in:
Robert
2023-12-19 16:19:59 +00:00
parent 54a03c8839
commit 2e51c1a657

View File

@@ -116,7 +116,10 @@ jobs:
needs: [cli-test] needs: [cli-test]
if: failure() && github.ref == 'refs/heads/main' if: failure() && github.ref == 'refs/heads/main'
permissions: permissions:
contents: read
issues: write issues: write
env:
GH_TOKEN: ${{ github.token }}
steps: steps:
- name: Create GitHub issue - name: Create GitHub issue
run: | run: |
@@ -141,7 +144,7 @@ jobs:
COMMENT_FILE="comment.md" COMMENT_FILE="comment.md"
RUN_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID RUN_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
printf 'CLI test [%s](%s) failed on ref `%s`' "$RUN_ID" "$RUN_URL" "$RUN_REF" > "$COMMENT_FILE" printf 'CLI test [%s](%s) failed on ref `%s`' "$GITHUB_RUN_ID" "$RUN_URL" "$GITHUB_REF" > "$COMMENT_FILE"
# `gh issue create` returns an issue URL, and `gh issue list | cut -f 1` returns an issue number. # `gh issue create` returns an issue URL, and `gh issue list | cut -f 1` returns an issue number.
# Both are accepted here. # Both are accepted here.