Skip to content

Commit 2465dcf

Browse files
committed
CI: Add artifact information to PR
1 parent 6d7ead6 commit 2465dcf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/pr.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,31 @@ jobs:
112112
EZBAKE_VERSION: ${{ needs.get-ezbake-version.outputs.ezbake_version }} # ensures that we used the built version of ezbake and don't pull from clojars.org
113113
- name: Upload build artifacts
114114
uses: actions/upload-artifact@v6
115+
id: upload
115116
with:
116117
name: ${{ matrix.project }}-${{ steps.version.outputs.describe }}-ezbake-${{ needs.get-ezbake-version.outputs.ezbake_version }}
117118
path: output/
118119
retention-days: 1 # quite low retention, because the artifacts are quite large
119120
overwrite: true # overwrite old artifacts if a PR runs again (artifacts are per PR * per project)
121+
- name: Find existing comment
122+
uses: peter-evans/find-comment@v4
123+
if: github.event.pull_request.head.repo.full_name == github.repository
124+
id: find-comment
125+
with:
126+
issue-number: ${{ github.event.pull_request.number }}
127+
comment-author: 'github-actions[bot]'
128+
body-includes: '<!-- build-artifacts -->'
129+
- name: Add or update comment
130+
uses: peter-evans/create-or-update-comment@v5
131+
if: github.event.pull_request.head.repo.full_name == github.repository
132+
with:
133+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
134+
issue-number: ${{ github.event.pull_request.number }}
135+
edit-mode: append
136+
body: |-
137+
<!-- build-artifacts -->
138+
The rpm/deb packages and the JAR file for ${{ github.repository }} are available in a zip archive:
139+
${{ steps.upload.outputs.artifact-url }}
120140
121141
tests:
122142
if: always()

0 commit comments

Comments
 (0)