@@ -28,74 +28,42 @@ concurrency:
2828 cancel-in-progress : true
2929
3030jobs :
31- build_manylinux :
32- name : ${{ matrix.policy }}_${{ matrix.platform }}
31+ build_manylinux2014_base :
3332 runs-on : ubuntu-22.04
34- permissions :
35- actions : write # this permission is needed to delete cache
36- strategy :
37- fail-fast : false
38- matrix :
39- policy : ["manylinux2014", "musllinux_1_2"]
40- platform : ["i686", "x86_64"]
41- include :
42- - policy : " manylinux_2_28"
43- platform : " x86_64"
44-
45- env :
46- POLICY : ${{ matrix.policy }}
47- PLATFORM : ${{ matrix.platform }}
48- COMMIT_SHA : ${{ github.sha }}
49-
5033 steps :
5134 - name : Checkout
5235 uses : actions/checkout@v4
53- with :
54- fetch-depth : 50
5536
56- - name : Set up emulation
57- if : matrix.platform != 'i686' && matrix.platform != 'x86_64'
37+ - name : Get tag name
38+ id : tag
39+ run : |
40+ COMMIT_DATE=$(git show -s --format=%cd --date=short ${{ github.sha }})
41+ if $(git rev-parse --is-shallow-repository); then
42+ git fetch --unshallow
43+ fi
44+ BUILD_NUMBER=$(git rev-list --since=${COMMIT_DATE}T00:00:00Z --first-parent --count ${{ github.sha }})
45+ BUILD_ID2=${COMMIT_DATE//-/.}-${BUILD_NUMBER}
46+ echo "tag=${BUILD_ID2}" >> "$GITHUB_OUTPUT"
47+
48+ - name : Set up QEMU
5849 uses : docker/setup-qemu-action@v3
59- with :
60- platforms : ${{ matrix.platform }}
6150
6251 - name : Set up Docker Buildx
6352 uses : docker/setup-buildx-action@v3
6453
65- - name : Restore cache
66- if : github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
67- uses : actions/cache/restore@v4
54+ - name : Login to Quay.io
55+ if : github.event_name == 'push'
56+ uses : docker/login-action@v3
6857 with :
69- path : .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
70- key : buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
58+ registry : quay.io
59+ username : ${{ secrets.QUAY_USERNAME }}
60+ password : ${{ secrets.QUAY_PASSWORD }}
7161
72- - name : Build
73- run : ./build.sh
74-
75- - name : Delete cache
76- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
77- run : |
78- KEY="buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}"
79- gh cache delete ${KEY} || true
80- env :
81- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82-
83- - name : Save cache
84- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
85- uses : actions/cache/save@v4
62+ - name : Build image
63+ uses : docker/build-push-action@v6
8664 with :
87- path : .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
88- key : buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
89-
90- - name : Deploy
91- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux'
92- run : ./deploy.sh
93- env :
94- QUAY_USERNAME : ${{ secrets.QUAY_USERNAME }}
95- QUAY_PASSWORD : ${{ secrets.QUAY_PASSWORD }}
96-
97- all_passed :
98- needs : [build_manylinux]
99- runs-on : ubuntu-latest
100- steps :
101- - run : echo "All jobs passed"
65+ context : ./docker
66+ platforms : linux/arm64,linux/x86_64,linux/386,linux/ppc64le,linux/s390x
67+ load : false
68+ push : true
69+ tags : quay.io/pypa/manylinux2014_base:latest,quay.io/pypa/manylinux2014_base:${{ steps.tag.outputs.tag }}
0 commit comments