@@ -34,56 +34,33 @@ jobs:
34
34
musl-target : aarch64-linux-musl
35
35
36
36
steps :
37
- # Podman 4.x is necessary here because it supports --platform=$BUILDPLATFORM. Otherwise, podman
38
- # would pull the base image for aarch64 when building for aarch64. See https://github.com/containers/buildah/pull/3757
39
- # for the implementation. GitHub actions currently still ship Podman 3.x, even though 4.x has been
40
- # out for over a year.
41
- # The repository used is the same as GitHub actions uses for their source - just that it's the unstable version
42
- # rather than the stable one.
43
- # TODO: Once podman 4.x is available in actions by default (or in the Ubuntu repositories), remove this.
44
- - name : Install podman 4.x
45
- run : |
46
- sudo mkdir -p /etc/apt/keyrings
47
- curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \
48
- | gpg --dearmor \
49
- | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
50
- echo \
51
- "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
52
- https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \
53
- | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
54
- sudo apt -qq -y purge buildah podman
55
- sudo apt -qq -y autoremove --purge
56
- sudo apt update -qq
57
- sudo apt -qq -y install podman
58
37
59
38
- name : Checkout sources
60
39
uses : actions/checkout@v3
61
40
62
- - name : Login to ghcr
63
- if : github.ref == 'refs/heads/trunk' && github.event_name != 'pull_request'
64
- run : |
65
- echo "${{ secrets.GITHUB_TOKEN }}" | podman login -u ${{ github.repository_owner }} --password-stdin ghcr.io
41
+ - name : Set up Docker Buildx
42
+ uses : docker/setup-buildx-action@v3
66
43
44
+ - name : Login to GHCR
45
+ uses : docker/login-action@v3
46
+ with :
47
+ registry : ghcr.io
48
+ username : ${{ github.repository_owner }}
49
+ password : ${{ secrets.GHCR_TOKEN }}
50
+
67
51
- name : Convert GITHUB_REPOSITORY into lowercase
68
52
run : |
69
53
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
70
54
71
- - name : Build ${{ matrix.tag }}
72
- run : |
73
- podman build \
74
- --format docker \
75
- --arch ${{ matrix.arch }} \
76
- --build-arg FEATURES=${{ matrix.features }} \
77
- --build-arg RUST_TARGET=${{ matrix.rust-target }} \
78
- --build-arg MUSL_TARGET=${{ matrix.musl-target }} \
79
- -t http-proxy:${{ matrix.tag }} \
80
- .
81
-
82
- - name : Push image
83
- if : github.ref == 'refs/heads/trunk' && github.event_name != 'pull_request'
84
- run : |
85
- podman tag http-proxy:${{ matrix.tag }} ghcr.io/${REPO}:${{ matrix.tag }}
86
- podman push ghcr.io/${REPO}:${{ matrix.tag }}
55
+ - name : Build and push ${{ matrix.tag }}
56
+ uses : docker/build-push-action@v5
57
+ with :
58
+ push : github.ref == 'refs/heads/trunk' && github.event_name != 'pull_request'
59
+ tags : http-proxy:${{ matrix.tag }}
60
+ build-args : |
61
+ FEATURES=${{ matrix.features }}
62
+ RUST_TARGET=${{ matrix.rust-target }}
63
+ MUSL_TARGET=${{ matrix.musl-target }}
87
64
88
65
create-manifest :
89
66
name : Create Docker manifests
0 commit comments