Skip to content

Commit 49cc72c

Browse files
authored
Fix dump mirror comment posting (#6566)
1 parent 5e95c87 commit 49cc72c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/mirror-dump.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Mirror dump to a private Gist
24+
id: mirror
2425
uses: actions/github-script@v7
2526
with:
2627
github-token: ${{ secrets.GIST_TOKEN }}
@@ -46,13 +47,19 @@ jobs:
4647
public: false
4748
});
4849
49-
const link = `${process.env.GIST_LINK_FMT}${gist.id}`;
50+
core.setOutput('link', `${process.env.GIST_LINK_FMT}${gist.id}`);
51+
core.setOutput('issue_number', issue.number);
5052
53+
- name: Comment gist link on issue
54+
if: steps.mirror.outputs.link != ''
55+
uses: actions/github-script@v7
56+
with:
57+
script: |
5158
await github.rest.issues.createComment({
5259
owner: context.repo.owner,
5360
repo: context.repo.repo,
54-
issue_number: issue.number,
55-
body: `📋 Essentials Dump Backup → ${link}`
61+
issue_number: ${{ steps.mirror.outputs.issue_number }},
62+
body: `📋 Essentials Dump Backup → ${{ steps.mirror.outputs.link }}`
5663
});
5764
5865
cleanup-gist:

0 commit comments

Comments
 (0)