Skip to content
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

Download crane binary corresponding to underlying runner architecture e.g. ARM64 #5

Closed
bbednarek opened this issue Feb 15, 2023 · 1 comment · Fixed by #6
Closed

Comments

@bbednarek
Copy link
Contributor

bbednarek commented Feb 15, 2023

We deploy self-hosted runners which are running on ARM64 architecture.
We are getting following error

Installing crane @ v0.13.0 for Linux
+ [[ ! -z v0.13.0 ]]
+ echo 'Installing crane @ v0.13.0 for Linux'
+ sudo tar xzf - -C /usr/local/bin crane
+ curl -fsL https://github.com/google/go-containerregistry/releases/download/v0.13.0/go-containerregistry_Linux_x86_64.tar.gz
+ echo ***
+ crane auth login ghcr.io --username dummy --password-stdin
/runner/_work/_temp/5e7579eb-dc9b-4db1-9e85-9780ce8[51](https://github.com/finmid/Devops-github-actions/actions/runs/4184983841/jobs/7251528419#step:9:53)402.sh: line 30: /usr/local/bin/crane: cannot execute binary file: Exec format error
Error: Process completed with exit code 126.

Looks like setup-crane action is always downloading go-containerregistry_${os}_x86_64.tar.gz binary and it's not taking into account architecture of underlying system.

I see 2 possible options to solve it:

  1. (preferable) automatically download crane binary based on architecture of the underlying system
  2. parametrize architecture in the action
@bbednarek
Copy link
Contributor Author

bbednarek commented Feb 15, 2023

I merged it into my fork to unblock myself and I can confirm that it works and the issue is gone.

imjasonh added a commit that referenced this issue Feb 15, 2023
Download crane binary corresponding to underlying runner architecture
This was referenced Feb 16, 2023
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 a pull request may close this issue.

1 participant