|
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | build_docker: |
18 | | - runs-on: ubuntu-latest |
| 18 | + runs-on: ${{ matrix.os }} |
19 | 19 | strategy: |
20 | 20 | matrix: |
21 | 21 | base_image: [many, musl] |
22 | | - arch: [x86_64, aarch64] |
| 22 | + os: [ubuntu-24.04, ubuntu-24.04-arm] |
23 | 23 | steps: |
24 | 24 | - uses: actions/checkout@v4 |
25 | | - - name: Set up QEMU |
26 | | - if: ${{ matrix.arch == 'aarch64' }} |
27 | | - uses: docker/setup-qemu-action@v3 |
28 | | - with: |
29 | | - platforms: all |
30 | 25 | - uses: docker/setup-buildx-action@v3 |
31 | 26 | - name: Log in to Docker Hub |
32 | 27 | if: github.event_name == 'push' |
33 | 28 | uses: docker/login-action@v3 |
34 | 29 | with: |
35 | 30 | username: ${{ secrets.DOCKER_USER }} |
36 | 31 | password: ${{ secrets.DOCKER_TOKEN }} |
37 | | - - name: Sets platform for arm64 |
| 32 | + - name: Sets platform/arch for arm64 |
38 | 33 | run: | |
39 | 34 | echo "PLATFORM=linux/arm64" >> $GITHUB_ENV |
40 | | - if: matrix.arch == 'aarch64' |
41 | | - - name: Sets platform for amd64 |
| 35 | + echo "ARCH=aarch64" >> $GITHUB_ENV |
| 36 | + if: matrix.os == 'ubuntu-24.04-arm' |
| 37 | + - name: Sets platform/arch for amd64 |
42 | 38 | run: | |
43 | 39 | echo "PLATFORM=linux/amd64" >> $GITHUB_ENV |
44 | | - if: matrix.arch == 'x86_64' |
| 40 | + echo "ARCH=x86_64" >> $GITHUB_ENV |
| 41 | + if: matrix.os == 'ubuntu-24.04' |
45 | 42 | - name: Sets env for manylinux |
46 | 43 | run: | |
47 | | - echo "BASE_IMAGE=quay.io/pypa/manylinux_2_28_${{ matrix.arch }}" >> $GITHUB_ENV |
| 44 | + echo "BASE_IMAGE=quay.io/pypa/manylinux_2_28_${{ env.ARCH }}" >> $GITHUB_ENV |
48 | 45 | if: matrix.base_image == 'many' |
49 | 46 | - name: Sets env for musllinux |
50 | 47 | run: | |
51 | | - echo "BASE_IMAGE=quay.io/pypa/musllinux_1_1_${{ matrix.arch }}" >> $GITHUB_ENV |
| 48 | + echo "BASE_IMAGE=quay.io/pypa/musllinux_1_1_${{ env.ARCH }}" >> $GITHUB_ENV |
52 | 49 | if: matrix.base_image == 'musl' |
53 | | - - name: Build and push ${{ matrix.base_image }}-${{ matrix.arch }} docker image |
| 50 | + - name: Build and push ${{ matrix.base_image }}-${{ env.ARCH }} docker image |
54 | 51 | uses: docker/build-push-action@v6 |
55 | 52 | with: |
56 | 53 | context: docker/manylinux-builder |
|
60 | 57 | push: ${{ github.event_name == 'push' }} |
61 | 58 | build-args: | |
62 | 59 | base_image=${{ env.BASE_IMAGE }} |
63 | | - tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ matrix.arch }} |
| 60 | + tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ env.ARCH }} |
0 commit comments