|
10 | 10 | jobs: |
11 | 11 | build-images: |
12 | 12 | name: Build Docker Images |
13 | | - runs-on: ubuntu-latest |
| 13 | + |
14 | 14 | strategy: |
15 | 15 | matrix: |
16 | 16 | include: |
17 | 17 | - tag: amd64 |
18 | 18 | features: "" |
19 | | - arch: amd64 |
20 | | - rust-target: x86_64-unknown-linux-musl |
21 | | - musl-target: x86_64-linux-musl |
| 19 | + image: ubuntu-latest |
22 | 20 | - tag: metrics-amd64 |
23 | 21 | features: expose-metrics |
24 | | - arch: amd64 |
25 | | - rust-target: x86_64-unknown-linux-musl |
26 | | - musl-target: x86_64-linux-musl |
| 22 | + image: ubuntu-latest |
27 | 23 | - tag: armv8 |
28 | 24 | features: "" |
29 | | - arch: arm64/v8 |
30 | | - rust-target: aarch64-unknown-linux-musl |
31 | | - musl-target: aarch64-linux-musl |
| 25 | + image: ubuntu-24.04-arm |
32 | 26 | - tag: metrics-armv8 |
33 | 27 | features: expose-metrics |
34 | | - arch: arm64/v8 |
35 | | - rust-target: aarch64-unknown-linux-musl |
36 | | - musl-target: aarch64-linux-musl |
| 28 | + image: ubuntu-24.04-arm |
37 | 29 |
|
38 | | - steps: |
39 | | - # Podman 4.x is necessary here because it supports --platform=$BUILDPLATFORM. Otherwise, podman |
40 | | - # would pull the base image for aarch64 when building for aarch64. See https://github.com/containers/buildah/pull/3757 |
41 | | - # for the implementation. GitHub actions currently still ship Podman 3.x, even though 4.x has been |
42 | | - # out for over a year. |
43 | | - # The repository used is the same as GitHub actions uses for their source - just that it's the unstable version |
44 | | - # rather than the stable one. |
45 | | - # TODO: Once podman 4.x is available in actions by default (or in the Ubuntu repositories), remove this. |
46 | | - - name: Install podman 4.x |
47 | | - run: | |
48 | | - sudo mkdir -p /etc/apt/keyrings |
49 | | - curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \ |
50 | | - | gpg --dearmor \ |
51 | | - | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null |
52 | | - echo \ |
53 | | - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\ |
54 | | - https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \ |
55 | | - | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null |
56 | | - sudo apt -qq -y purge buildah podman |
57 | | - sudo apt -qq -y autoremove --purge |
58 | | - sudo apt update -qq |
59 | | - sudo apt -qq -y install podman |
| 30 | + runs-on: ${{ matrix.image }} |
60 | 31 |
|
| 32 | + steps: |
61 | 33 | - name: Checkout sources |
62 | 34 | uses: actions/checkout@v3 |
63 | 35 |
|
|
74 | 46 | run: | |
75 | 47 | podman build \ |
76 | 48 | --format docker \ |
77 | | - --arch ${{ matrix.arch }} \ |
78 | 49 | --build-arg FEATURES=${{ matrix.features }} \ |
79 | | - --build-arg RUST_TARGET=${{ matrix.rust-target }} \ |
80 | | - --build-arg MUSL_TARGET=${{ matrix.musl-target }} \ |
81 | 50 | -t http-proxy:${{ matrix.tag }} \ |
82 | 51 | . |
83 | 52 |
|
|
0 commit comments