-
Notifications
You must be signed in to change notification settings - Fork 967
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
run specified steps outside of container before the container is launched #812
Comments
@igagis, the following alternatives might work for you. You can optionally setup QEMU for a target architecture only (see dbhi/qus). name: ci
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: dbhi/qus/action@master
- name: build
uses: docker://debian:buster
with:
args: make name: ci
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Setup QEMU
run: docker run --rm --privileged aptman/qus -s -- -p
- name: build
uses: docker://debian:buster
with:
args: make name: ci
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Setup QEMU
run: apt update && apt install --yes binfmt-support qemu-user-static
- name: build
uses: docker://debian:buster
with:
args: make |
Thanks! I understand that these |
This is more difficult than it seems: GitHub fucks up argument quoting and passing, so the |
Let's consider the following workflow:
for job
linux
it will first launch the container, then checkout the source code (inside of the already running container?), then run thebuild
step inside of the container.What I want to be able to do is to add some
pre-steps
which would be run outside of the container and before the container is launched. In particular, I need this to installqemu
andbinfmt
packages.So, the workflow would look something like this:
Note, that I changed the container image to my custom built image for
ARM
architecture, i.e. all binaries inside of the image areARM
binaries.After installing
qemu
andbinfmt
it is possible to runARM
binaries onx86_64
architecture, using emulation. This approach works for me on Travis-CI, but there I start the docker manually and, thus, I have full control over what I run in host environment and what inside of the container. Now I'm trying to move to github actions and have this problem that it is only possible to either run everything inside of the container or everything in host ubuntu virtual machine.The text was updated successfully, but these errors were encountered: