add arch option (specify runner architecture) #11
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: actions/forgejo-release#11
Loading…
Reference in a new issue
No description provided.
Delete branch "leana8959/forgejo-release:add_arch_option"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This would close #10 by adding the
architecture
option.Should I add integration tests for this? It's fairly simple, and I don't know how to test it.
@ -21,3 +21,3 @@
setup_tea() {
if ! test -f $BIN_DIR/tea ; then
curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-amd64 > $BIN_DIR/tea
curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-$ARCH > $BIN_DIR/tea
Could it be inferred from the information of the machine running the action? It would be easier if that was transparent to the user.
I'm thinking about adding a
case
statement to parse outputs ofuname -m
. Would this help?In this case, maybe we can reconsider if we need to expose this option to the end user, since it's inferred from the runner automatically.
I think that would be fine. Automated detection is best.
In this case, what should I put for the default case? i.e. how should the script fail when the platform is not in the list of cases I defined?
Here's the draft I have in mind at the moment
Falling back to amd64 would ensure backward compatibility: if a case was missed it won't break on a setup that previously worked. Does that sound right?
I just stumbled upon the problem, that forgejo-release does not work on ARM devices. So I would be very happy, if this PR could be revived.
To just give another option for this specific issue,
dpkg --print-architecture
gives the architecture directly without the need to be parsed. As we assume a Debian based system anyways by usingapt-get
, this should not break any current setups.dpkg --print-architecture
@Seltsamsel I have just switch to
dpkg
to detect the architecture, thanks for the tip !@earl-warren Is there something I need to do to test this change ? Thanks.
the tests show that what you did does not break anything: this is enough to be merged 👍