Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 7 additions & 38 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,26 @@ on:
jobs:
build-images:
name: Build Docker Images
runs-on: ubuntu-latest

strategy:
matrix:
include:
- tag: amd64
features: ""
arch: amd64
rust-target: x86_64-unknown-linux-musl
musl-target: x86_64-linux-musl
image: ubuntu-latest
- tag: metrics-amd64
features: expose-metrics
arch: amd64
rust-target: x86_64-unknown-linux-musl
musl-target: x86_64-linux-musl
image: ubuntu-latest
- tag: armv8
features: ""
arch: arm64/v8
rust-target: aarch64-unknown-linux-musl
musl-target: aarch64-linux-musl
image: ubuntu-24.04-arm
- tag: metrics-armv8
features: expose-metrics
arch: arm64/v8
rust-target: aarch64-unknown-linux-musl
musl-target: aarch64-linux-musl
image: ubuntu-24.04-arm

steps:
# Podman 4.x is necessary here because it supports --platform=$BUILDPLATFORM. Otherwise, podman
# would pull the base image for aarch64 when building for aarch64. See https://github.com/containers/buildah/pull/3757
# for the implementation. GitHub actions currently still ship Podman 3.x, even though 4.x has been
# out for over a year.
# The repository used is the same as GitHub actions uses for their source - just that it's the unstable version
# rather than the stable one.
# TODO: Once podman 4.x is available in actions by default (or in the Ubuntu repositories), remove this.
- name: Install podman 4.x
run: |
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
sudo apt -qq -y purge buildah podman
sudo apt -qq -y autoremove --purge
sudo apt update -qq
sudo apt -qq -y install podman
runs-on: ${{ matrix.image }}

steps:
- name: Checkout sources
uses: actions/checkout@v3

Expand All @@ -74,10 +46,7 @@ jobs:
run: |
podman build \
--format docker \
--arch ${{ matrix.arch }} \
--build-arg FEATURES=${{ matrix.features }} \
--build-arg RUST_TARGET=${{ matrix.rust-target }} \
--build-arg MUSL_TARGET=${{ matrix.musl-target }} \
-t http-proxy:${{ matrix.tag }} \
.

Expand Down
Loading