-
Notifications
You must be signed in to change notification settings - Fork 39
Automate building nightly binaries #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Use crystal-xbuild container to build Ameba binaries and upload those as artifacts part of the `nightly` release/tag. Currently it supports the platforms described in crystal-xbuild container: https://github.com/luislavena/crystal-xbuild-container#supported-platforms - Alpine Linux: x86_64 (64bits) and aarch64 (ARM64) - macOS: aarch64 (ARM64), SDK version 13 (Ventura) Things that remains to be confirmed and done: - Lock to an specific version of Crystal (crystal-xbuild only provides tip/latest release) - Enable workflow as part of successful CI on the master branch Relates to crystal-ameba#470
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using github.actor?
https://github.com/orgs/community/discussions/40405#discussioncomment-8361451
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to GitHub docs, it will put the actor username and/or ID instead of just the bot as attribution for the change:
github.actor
: The username of the user that triggered the initial workflow run. If the workflow run is a re-run, this value may differ from github.triggering_actor. Any workflow re-runs will use the privileges of github.actor, even if the actor initiating the re-run (github.triggering_actor) has different privileges.
github.actor_id
: The account ID of the person or app that triggered the initial workflow run. For example, 1234567. Note that this is different from the actor username.
I can introduce that change, but it will show that user as the committer of the tag, instead of the bot itself: https://github.com/luislavena/ameba/releases/tag/nightly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, thanks for the explanation. Since we need the bot name here, what do you think about using a more meaningful email address, like github-actions[bot]@users.noreply.github.com
? I see also this combination is widely used for similar use-cases:
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @veelenga, I think I found the docs reference for that:
I will do the updates to better display that.
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: docker://ghcr.io/luislavena/hydrofoil-crystal:1.16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the version be extracted to the env variable for easier updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now crystal-xbuild
container is using tip
tag, running latest version of Crystal from hydrofoil-crystal, so we should prefer to lock to an specific version.
I need to introduce a more controlled versioning on the container now that I'm actively using (and no longer just experimenting with it).
I will take care of that first before.
Use crystal-xbuild container to build Ameba binaries and upload those as artifacts part of the
nightly
release/tag.Currently it supports the platforms described in crystal-xbuild container:
https://github.com/luislavena/crystal-xbuild-container#supported-platforms
Things that remains to be confirmed and done:
Relates to #470
You can see this at work on my fork:
release-nightly.yml
workflow was manually triggered from herenightly
tag and attach the artifacts to the release hereYou can download any of the binaries and validate them locally, which I did:
I've left as comments the connection between the nightly build and your current CI, as I'm not sure the best approach.
Opening this for discussion.
Cheers.
❤️ ❤️ ❤️