feat(ci): add build of alumet artefact on each PR#34
Open
AngeCyp wants to merge 1 commit into
Open
Conversation
410e73d to
c0a1eff
Compare
titouanj
reviewed
Jun 19, 2026
| id: vars | ||
| run: | | ||
| if [ "$GITHUB_EVENT_NAME" = "workflow_call" ]; then | ||
| # on trigger by workflow |
Contributor
There was a problem hiding this comment.
What workflow will call this one?
| echo "DOCKER_REVISION=pr${{ github.event.pull_request.number }}-${SHA}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| rpm: |
Contributor
There was a problem hiding this comment.
I think we can skip rpm workflow if only deb was updated, same in the other way
Member
Author
There was a problem hiding this comment.
2nd part, but yes it was planned
Comment on lines
+100
to
+176
| comment-output: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| ORDER: 'first' #could be 'first' or 'last' | ||
| SEARCH_STRING: "🔥" | ||
| BODY: "🔥 generated artifacts" | ||
| FORCE_RECREATE: true | ||
| needs: | ||
| - setup-input | ||
| - rpm | ||
| - deb | ||
| - docker | ||
| steps: | ||
| - name: Search for previous comment | ||
| id: find-comment | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| const opts = github.rest.issues.listComments.endpoint.merge({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| }); | ||
|
|
||
| // Paginate is used to retrieve the comments of every pages. | ||
| // See https://octokit.github.io/rest.js/v21/#pagination. | ||
| var comments = await github.paginate(opts) | ||
|
|
||
| // Reverse comments array if wanted | ||
| // (listComments returns the comments ordered by ascending ID). | ||
| if (process.env.ORDER === 'last') { | ||
| comments.reverse() | ||
| } | ||
|
|
||
| // Iterate over the comments array. | ||
| for (const comment of comments) { | ||
| if (comment.user.login !== 'github-actions[bot]') { | ||
| continue | ||
| } | ||
|
|
||
| if (comment.body.includes(process.env.SEARCH_STRING)) { | ||
| core.setOutput('comment-id', comment.id.toString()) | ||
| break | ||
| } | ||
| } | ||
|
|
||
| - name: Get body | ||
| id: get-body | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| const body = process.env.BODY || ""; | ||
|
|
||
| const runUrl = | ||
| `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}` + | ||
| `/actions/runs/${context.runId}`; | ||
|
|
||
| const message = ` | ||
| ### ${body} | ||
|
|
||
| --- | ||
|
|
||
| Artefacts can be found there: ${runUrl}`; | ||
|
|
||
| core.exportVariable('PR_MESSAGE', message) | ||
|
|
||
| - name: Create a new comment | ||
| if: ${{ env.FORCE_RECREATE == 'true' || steps.find-comment.outputs.comment-id == '' }} | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: process.env.COMMENT_BODY | ||
| }) |
Contributor
There was a problem hiding this comment.
I don't really understand this part. Why is it needed?
| name: Build Alumet artefacts | ||
|
|
||
| on: | ||
| pull_request: |
Contributor
There was a problem hiding this comment.
I don't think that this workflow should run if we only update the doc
497c39b to
4b43a66
Compare
4b43a66 to
35b8442
Compare
🔥 generated artifactsArtefacts can be found there: https://github.com/alumet-dev/packaging/actions/runs/27834180695 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.