Skip to content

feat(ci): add build of alumet artefact on each PR#34

Open
AngeCyp wants to merge 1 commit into
mainfrom
feat/add-ci-cd-validation
Open

feat(ci): add build of alumet artefact on each PR#34
AngeCyp wants to merge 1 commit into
mainfrom
feat/add-ci-cd-validation

Conversation

@AngeCyp

@AngeCyp AngeCyp commented Jun 19, 2026

Copy link
Copy Markdown
Member

No description provided.

@AngeCyp AngeCyp force-pushed the feat/add-ci-cd-validation branch 8 times, most recently from 410e73d to c0a1eff Compare June 19, 2026 12:36
id: vars
run: |
if [ "$GITHUB_EVENT_NAME" = "workflow_call" ]; then
# on trigger by workflow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What workflow will call this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alumet's one

echo "DOCKER_REVISION=pr${{ github.event.pull_request.number }}-${SHA}" >> $GITHUB_OUTPUT
fi

rpm:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can skip rpm workflow if only deb was updated, same in the other way

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand this part. Why is it needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name: Build Alumet artefacts

on:
pull_request:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this workflow should run if we only update the doc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

planned later

@AngeCyp AngeCyp force-pushed the feat/add-ci-cd-validation branch 7 times, most recently from 497c39b to 4b43a66 Compare June 19, 2026 15:06
@AngeCyp AngeCyp force-pushed the feat/add-ci-cd-validation branch from 4b43a66 to 35b8442 Compare June 19, 2026 15:20
@github-actions

Copy link
Copy Markdown

🔥 generated artifacts


Artefacts can be found there: https://github.com/alumet-dev/packaging/actions/runs/27834180695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants