jirutka / setup-alpine Goto Github PK
View Code? Open in Web Editor NEWEasily use Alpine Linux on GitHub Actions, with support for QEMU user emulator
License: MIT License
Easily use Alpine Linux on GitHub Actions, with support for QEMU user emulator
License: MIT License
Thanks for the action this is very useful for us to run some tests in Alpine rather than Ubuntu
The action works well for us, but we get this failure during the Post Run
Unfortunately this marks the job as failed, so pull requests can't be merged etc.
Is there something we can do here? We're using jirutka/setup-alpine@v1 and branch v3.16
Would it be possible to add to the readme how one could run this locally?
Caused by https://gitlab.alpinelinux.org/alpine/aports/-/commit/23e66e85c95beef9d3f72a2ccc510671fdb3462d
This is also applicable only to edge
currently
Example run: https://github.com/lapce/lapce/runs/7934076826
Lines 234 to 238 in aac9b11
I get this warning when running this action:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: webiny/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
name: Build U-Boot on Tag
on:
push:
tags:
- 'v*' # Trigger only for tags starting with 'v'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: aarch64
packages: >
build-base
- name: Run script inside Alpine chroot with aarch64 emulation
run: uname -m
shell: alpine.sh {0}
❄️ raptor@pelagus 20:40:52 29.02.2024 +00:00 1m47s71ms
├─ u-boot on CICD via ❄️ impure (shell)
╰───❯ act
[Build U-Boot on Tag/build] 🚀 Start image=catthehacker/ubuntu:act-latest
INFO[0000] Parallel tasks (0) below minimum, setting to 1
[Build U-Boot on Tag/build] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
INFO[0003] Parallel tasks (0) below minimum, setting to 1
[Build U-Boot on Tag/build] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build U-Boot on Tag/build] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[Build U-Boot on Tag/build] ☁ git clone 'https://github.com/jirutka/setup-alpine' # ref=v1
[Build U-Boot on Tag/build] ⭐ Run Pre Setup latest Alpine Linux
[Build U-Boot on Tag/build] ☁ git clone 'https://github.com/webiny/action-post-run' # ref=3.1.0
[Build U-Boot on Tag/build] ✅ Success - Pre Setup latest Alpine Linux
[Build U-Boot on Tag/build] ⭐ Run Main actions/checkout@v2
[Build U-Boot on Tag/build] 🐳 docker cp src=/home/raptor/src/u-boot/. dst=/home/raptor/src/u-boot
[Build U-Boot on Tag/build] ✅ Success - Main actions/checkout@v2
[Build U-Boot on Tag/build] ⭐ Run Main Setup latest Alpine Linux
[Build U-Boot on Tag/build] 🐳 docker cp src=/home/raptor/.cache/act/jirutka-setup-alpine@v1/ dst=/var/run/act/actions/jirutka-setup-alpine@v1/
[Build U-Boot on Tag/build] 'runs-on' key not defined in Build U-Boot on Tag/build
[Build U-Boot on Tag/build] ⭐ Run Main sudo -E ./setup-alpine.sh
[Build U-Boot on Tag/build] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-setup.sh] user= workdir=/var/run/act/actions/jirutka-setup-alpine@v1
[Build U-Boot on Tag/build] ❓ ::group::Prepare rootfs directory
| ▷ Alpine will be installed into: /home/root/rootfs/alpine-latest-aarch64
[Build U-Boot on Tag/build] ❓ ::endgroup::
[Build U-Boot on Tag/build] ❓ ::group::Download static apk-tools
| ▷ Downloading https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/x86_64/apk.static
| apk: OK
[Build U-Boot on Tag/build] ❓ ::endgroup::
[Build U-Boot on Tag/build] ❓ ::group::Install qemu-aarch64 emulator
| ▷ Fetching qemu-aarch64 from the latest-stable Alpine repository
| fetch http://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
| Downloading qemu-aarch64-8.1.5-r0
| ▷ Unpacking qemu-aarch64 and installing on the host system
| ▷ Registering binfmt for aarch64
| ./setup-alpine.sh: line 208: update-binfmts: command not found
|
| Error occurred at line 208:
| 205 | rm ./$qemu_cmd-*.apk
| 206 |
| 207 | info "Registering binfmt for $qemu_arch"
| > 208 | update-binfmts --import "$SCRIPT_DIR"/binfmts/$qemu_cmd
| 209 | fi
| 210 | fi
| 211 |
[Build U-Boot on Tag/build] ❗ ::error title=setup-alpine: Install qemu-aarch64 emulator::Error occurred at line 208: update-binfmts --import "$SCRIPT_DIR"/binfmts/$qemu_cmd (see the job log for more information)
[Build U-Boot on Tag/build] ❌ Failure - Main sudo -E ./setup-alpine.sh
[Build U-Boot on Tag/build] exitcode '1': failure
[Build U-Boot on Tag/build] 'runs-on' key not defined in Build U-Boot on Tag/build
[Build U-Boot on Tag/build] ⚙ ::set-output:: root-path=
[Build U-Boot on Tag/build] ❌ Failure - Main Setup latest Alpine Linux
[Build U-Boot on Tag/build] exitcode '1': failure
[Build U-Boot on Tag/build] ⭐ Run Post Setup latest Alpine Linux
[Build U-Boot on Tag/build] 🐳 docker cp src=/home/raptor/.cache/act/jirutka-setup-alpine@v1/ dst=/var/run/act/actions/jirutka-setup-alpine@v1/
[Build U-Boot on Tag/build] ✅ Success - Post Setup latest Alpine Linux
[Build U-Boot on Tag/build] 🏁 Job failed
Error: Job 'build' failed
In the Set up and use multiple Alpine environments in a single job section, shell-name: alpine-aarch64.sh
is specified for both of the first two steps. If I understand the purpose of shell-name
and the rest of the example correctly, the first one should be shell-name: alpine-x86_64.sh
.
Thank you for making this action it's much more elegant than using docker.
It tried this out last night and ran into an issue with aarch64 simulation.
When I ran the native x86_64 version things worked as expected however when I switched the arch to aarch64 I got a failed build.
You can see the example here.
https://github.com/upmaru-stage/locomo/actions/runs/6598676983/job/17927100353
After it failed the job kept running so I had to manually cancel
Here is the native version that succeeded
https://github.com/upmaru-stage/locomo/actions/runs/6598606683/job/17926843672
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: webiny/action-post-run, webiny/action-post-run, webiny/action-post-run, webiny/action-post-run
Currently from what I read from the setup script. It seems anything which is not x86 will setup qemu. However in the use case where we're using a self hosted runner that the host is natively aarch64 it should not setup qemu.
Man, just thank you for this awesome work! ❤️
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.