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

Add several architectures and their debian images #58

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
00ff802
Create Dockerfile.riscv64.buster
radimkohout Oct 24, 2021
ba7d782
Create Dockerfile.mips64le.bullseye
radimkohout Oct 24, 2021
179c2af
Update README.md
radimkohout Oct 24, 2021
8943a43
Create Dockerfile.i386.bullseye
OnlyCZ Oct 28, 2021
5bf19bb
Create Dockerfile.amd64.bullseye
Damian10012 Oct 29, 2021
ae61286
Create Dockerfile.riscv64.bullseye
Martin-P95 Oct 29, 2021
343770c
Create Dockerfile.i386.buster
JanSvaton Nov 2, 2021
ad8f0aa
Create Dockerfile.mips64le.buster
Sucheeej Nov 7, 2021
021be86
Create Dockerfile.amd64.buster
doggycs Nov 7, 2021
0ce0230
Moved files to correct place
radimkohout Nov 8, 2021
a5c58af
Update and rename Dockerfile.riscv64.bullseye to Dockerfile.riscv64.u…
radimkohout Nov 8, 2021
b5c342e
Update and rename Dockerfile.riscv64.buster to Dockerfile.riscv64.exp…
radimkohout Nov 8, 2021
34157e3
Update README.md
radimkohout Nov 8, 2021
f18f732
Update test.yml
radimkohout Nov 9, 2021
f64df64
Update test.yml
radimkohout Nov 9, 2021
998a376
Update test.yml
radimkohout Nov 9, 2021
70e3581
Update test.yml
radimkohout Nov 9, 2021
a9fbba7
Update test.yml
radimkohout Nov 12, 2021
c28524a
Update test.yml
radimkohout Nov 12, 2021
77574b6
Update test.yml
radimkohout Nov 12, 2021
eea7efb
Merge branch 'uraimo:master' into master
radimkohout Nov 18, 2021
95b3a93
Update Dockerfile.i386.bullseye
radimkohout Nov 18, 2021
1ec5f9a
Update Dockerfile.i386.buster
radimkohout Nov 18, 2021
9aaf27b
Update test.yml
radimkohout Nov 18, 2021
ff27529
Update README.md
radimkohout Nov 18, 2021
1953239
Update test.yml
radimkohout Nov 18, 2021
bf7a9de
Update README.md
radimkohout Nov 18, 2021
0b776fe
Fixed typo
radimkohout Nov 18, 2021
c40a018
Update test.yml
radimkohout Nov 18, 2021
f33b73b
Create Dockerfile.i386.alpine_latest
radimkohout Nov 18, 2021
8ff0fae
Update test.yml
radimkohout Nov 18, 2021
ecf9175
Update Dockerfile.i386.alpine_latest
radimkohout Nov 18, 2021
1c31c3c
Update README.md
radimkohout Nov 19, 2021
42214fa
Update run-on-arch.sh
radimkohout Dec 29, 2021
5f2c49e
Update test.yml
radimkohout Feb 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ jobs:
distro: ubuntu18.04
- arch: aarch64
distro: bullseye
- arch: i386
distro: bullseye
- arch: amd64
distro: bullseye
- arch: mips64le
distro: bullseye
- arch: i386
distro: alpine_latest
- arch: riscv64
distro: unstable
# Run tests that only need to be run on one matrix node
run_extra_tests: true

Expand Down Expand Up @@ -80,7 +90,7 @@ jobs:
# image layer.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
ubuntu*|jessie|stretch|buster|bullseye|unstable|experimantal)
radimkohout marked this conversation as resolved.
Show resolved Hide resolved
apt-get update -q -y
apt-get install -q -y git
;;
Expand Down Expand Up @@ -169,6 +179,9 @@ jobs:
case "${{ matrix.arch }}" in
armv6) expected_arch="armv6l" ;;
armv7) expected_arch="armv7l" ;;
mips64le) expected_arch="mips64" ;;
i386) expected_arch="i686" ;;
amd64) expected_arch="x86_64" ;;
*) expected_arch="${{ matrix.arch }}" ;;
esac

Expand All @@ -184,6 +197,7 @@ jobs:
ubuntu*) distro_key="ubuntu" ;;
fedora*) distro_key="fedora" ;;
archarm*) distro_key="archarm" ;;
unstable) distro_key="pretty_name=debian gnu/linux bookworm/sid;name=debian gnu/linux;id=debian;home_url=https://www.debian.org/;support_url=https://www.debian.org/support;bug_report_url=https://bugs.debian.org/;" ;;
*) distro_key="${{ matrix.distro }}" ;;
esac

Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.amd64.bullseye
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM amd64/debian:bullseye

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.amd64.buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM amd64/debian:buster

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
5 changes: 5 additions & 0 deletions Dockerfiles/Dockerfile.i386.alpine_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM i386/alpine:latest

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
ENTRYPOINT ["linux32", "--"]
5 changes: 5 additions & 0 deletions Dockerfiles/Dockerfile.i386.bullseye
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM i386/debian:bullseye

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
ENTRYPOINT ["linux32", "--"]
5 changes: 5 additions & 0 deletions Dockerfiles/Dockerfile.i386.buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM i386/debian:buster

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
ENTRYPOINT ["linux32", "--"]
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.mips64le.bullseye
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mips64le/debian:bullseye

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.mips64le.buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mips64le/debian:buster

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.experimental
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM riscv64/debian:experimental

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile.riscv64.unstable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM riscv64/debian:unstable

COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A GitHub Action that executes commands on non-x86 CPU architecture (armv6, armv7

This action requires three input parameters:

* `arch`: CPU architecture: `armv6`, `armv7`, `aarch64`, `s390x`, or `ppc64le`. See [Supported Platforms](#supported-platforms) for the full matrix.
* `arch`: CPU architecture: `armv6`, `armv7`, `aarch64`, `s390x`, `ppc64le`, `i386`, `amd64`, `mips64le`, or `riscv64`. See [Supported Platforms](#supported-platforms) for the full matrix.
* `distro`: Linux distribution name: `ubuntu16.04`, `ubuntu18.04`, `ubuntu20.04`, `bullseye`, `buster`, `stretch`, `jessie`, `fedora_latest`, `alpine_latest` or `archarm_latest`. See [Supported Platforms](#supported-platforms) for the full matrix.
* `run`: Shell commands to execute in the container.

Expand Down Expand Up @@ -154,6 +154,10 @@ This table details the valid `arch`/`distro` combinations:
| aarch64 | stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, fedora_latest, alpine_latest, archarm_latest |
| s390x | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04, ubuntu20.04, fedora_latest, alpine_latest |
| ppc64le | jessie, stretch, buster, bullseye, ubuntu16.04, ubuntu18.04,ubuntu20.04, fedora_latest, alpine_latest |
| amd64 | buster, bullseye |
| i386 | buster, bullseye, alpine_lastest |
| mips64le | buster, bullseye |
| riscv64 | unstable, experimental |


Using an invalid `arch`/`distro` combination will fail.
Expand All @@ -162,6 +166,8 @@ Using an invalid `arch`/`distro` combination will fail.

New distros and archs can be added simply by creating a Dockerfile named `Dockerfile.{arch}.{distro}` (that targets an image for the desired combination) in the [Dockerfiles](https://github.com/uraimo/run-on-arch-action/blob/master/Dockerfiles) directory. Pull requests welcome!

Note: If you're adding an i386 architecture distro, make sure that the Dockerfile contains `ENTRYPOINT ["linux32", "--"]`, otherwise uname will report incorrect architecture.

## Authors

[Umberto Raimondi](https://github.com/uraimo)
Expand Down
1 change: 1 addition & 0 deletions src/run-on-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ run_container () {
docker run \
--workdir "${GITHUB_WORKSPACE}" \
--rm \
--privileged=true \
-e DEBIAN_FRONTEND=noninteractive \
-e CI \
-e GITHUB_ACTION \
Expand Down