Skip to content

Commit 6227270

Browse files
authored
Merge pull request #81 from OpenVoxProject/comment
CI: Add artifact information to PR
2 parents 1f6f433 + bf02197 commit 6227270

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
Thank you for contributing to this project!
3+
4+
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
5+
- Please check that here is no existing issue or PR that addresses your problem.
6+
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
7+
8+
- The CI will build rpm and deb packages for openvoxdb & openvox-server. The
9+
packages will be stored in a zip archive and uploaded as GitHub artifacts.
10+
In the PR, go to Checks -> main. The archives will be linked at the bottom. It's
11+
always named openvoxerver/openvoxdb-$(git describe). The artifacts are available for 24
12+
hours.
13+
14+
-->
15+
16+
#### Pull Request (PR) description
17+
<!--
18+
Replace this comment with a description of your pull request.
19+
-->
20+
21+
#### This Pull Request (PR) fixes the following issues
22+
<!--
23+
Replace this comment with the list of issues or n/a.
24+
Use format:
25+
Fixes #123
26+
Fixes #124
27+
-->

.github/workflows/pr.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
runs-on: ubuntu-24.04
7878
needs:
7979
- get-ezbake-version
80+
permissions:
81+
pull-requests: write # to comment on the PR
8082
strategy:
8183
fail-fast: false
8284
matrix:
@@ -112,11 +114,31 @@ jobs:
112114
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
113115
- name: Upload build artifacts
114116
uses: actions/upload-artifact@v6
117+
id: upload
115118
with:
116119
name: ${{ matrix.project }}-${{ steps.version.outputs.describe }}-ezbake-${{ needs.get-ezbake-version.outputs.ezbake_version }}
117120
path: output/
118121
retention-days: 1 # quite low retention, because the artifacts are quite large
119122
overwrite: true # overwrite old artifacts if a PR runs again (artifacts are per PR * per project)
123+
- name: Find existing comment
124+
uses: peter-evans/find-comment@v4
125+
if: github.event.pull_request.head.repo.full_name == github.repository
126+
id: find-comment
127+
with:
128+
issue-number: ${{ github.event.pull_request.number }}
129+
comment-author: 'github-actions[bot]'
130+
body-includes: '<!-- build-artifacts -->'
131+
- name: Add or update comment
132+
uses: peter-evans/create-or-update-comment@v5
133+
if: github.event.pull_request.head.repo.full_name == github.repository
134+
with:
135+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
136+
issue-number: ${{ github.event.pull_request.number }}
137+
edit-mode: append
138+
body: |-
139+
<!-- build-artifacts -->
140+
The rpm/deb packages and the JAR file for ${{ github.repository }} are available in a zip archive:
141+
${{ steps.upload.outputs.artifact-url }}
120142
121143
tests:
122144
if: always()

0 commit comments

Comments
 (0)