Skip to content

Commit 6b1086d

Browse files
Copilotgliptak
andauthored
Add artifact link posting to PRs (#41)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: gliptak <[email protected]>
1 parent 1940471 commit 6b1086d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: ci
22

3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
37
on:
48
push:
59
branches:
@@ -28,10 +32,18 @@ jobs:
2832
env:
2933
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3034
- uses: actions/upload-artifact@v4
35+
id: upload-artifact
3136
if: startsWith(github.ref , 'refs/tags/v') == false
3237
with:
3338
name: hcl2json
3439
path: dist/*
40+
- name: Post artifact link
41+
if: github.event_name == 'pull_request'
42+
uses: peter-evans/create-or-update-comment@v4
43+
with:
44+
issue-number: ${{ github.event.number }}
45+
body: |
46+
Build artifacts: [${{ steps.upload-artifact.outputs.artifact-url }}](${{ steps.upload-artifact.outputs.artifact-url }})
3547
- uses: goreleaser/goreleaser-action@v6
3648
if: startsWith(github.ref , 'refs/tags/v')
3749
with:

0 commit comments

Comments
 (0)