Skip to content

Commit a62abac

Browse files
bluelindenKeavon
authored andcommitted
Comment on !build requests with the Actions run ID for easier troubleshooting
1 parent 12453d2 commit a62abac

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/comment-!build-commands.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ jobs:
9292
echo "Failed to detect if the build command written in the comment should have been '!build-dev', '!build-profiling', or '!build'" >> $GITHUB_OUTPUT
9393
fi
9494
95+
- name: 💬 Comment Actions run link
96+
id: comment_actions_run_link
97+
uses: actions/github-script@v6
98+
with:
99+
script: |
100+
return (await github.rest.issues.createComment({
101+
issue_number: context.issue.number,
102+
owner: context.repo.owner,
103+
repo: context.repo.repo,
104+
body: '🚧 **Building Graphite with command** `${{ steps.build_command.outputs.command }}` ...\n\nYou can monitor the progress of this build [here](https://github.com/GraphiteEditor/Graphite/actions/runs' + context.runId + ').'
105+
})).id;
106+
107+
95108
- name: 🌐 Build Graphite web code
96109
env:
97110
NODE_ENV: production
@@ -114,8 +127,8 @@ jobs:
114127
uses: actions/github-script@v6
115128
with:
116129
script: |
117-
github.rest.issues.createComment({
118-
issue_number: context.issue.number,
130+
github.rest.issues.updateComment({
131+
comment_id: ${{ steps.comment_actions_run_link.outputs.result }},
119132
owner: context.repo.owner,
120133
repo: context.repo.repo,
121134
body: '| 📦 **Build Complete for** ${{ steps.commit_info.outputs.sha }} |\n|-|\n| ${{ steps.cloudflare.outputs.url }} |'

0 commit comments

Comments
 (0)