|
10 | 10 | DOCKER_BUILD_REPOSITORY: quay.io/unstructured-io/build-unstructured-api |
11 | 11 | PACKAGE: "unstructured-api" |
12 | 12 | PIPELINE_FAMILY: "general" |
13 | | - PYTHON_VERSION: "3.12" |
14 | 13 |
|
15 | 14 | jobs: |
16 | 15 | set-short-sha: |
|
24 | 23 | build-images: |
25 | 24 | strategy: |
26 | 25 | matrix: |
27 | | - #arch: ["arm64", "amd64"] |
28 | | - # NOTE(luke): temporary disable arm64 since its failing the smoke test |
29 | | - arch: ["amd64"] |
30 | | - runs-on: ubuntu-latest |
| 26 | + arch: ["arm64", "amd64"] |
| 27 | + runs-on: ${{ matrix.arch == 'arm64' && 'opensource-linux-arm64-4core' || 'ubuntu-latest' }} |
31 | 28 | needs: set-short-sha |
32 | 29 | env: |
33 | 30 | SHORT_SHA: ${{ needs.set-short-sha.outputs.short_sha }} |
|
36 | 33 | - name: Set up Docker Buildx |
37 | 34 | uses: docker/setup-buildx-action@v3 |
38 | 35 | with: |
39 | | - driver: ${{ matrix.arch == 'amd64' && 'docker' || 'docker-container' }} |
| 36 | + driver: docker |
40 | 37 | - name: Checkout code |
41 | 38 | uses: actions/checkout@v5 |
| 39 | + - name: Read Python version from .python-version |
| 40 | + run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV |
42 | 41 | - name: Login to Quay.io |
43 | 42 | uses: docker/login-action@v3 |
44 | 43 | with: |
|
84 | 83 | run: uv python install ${{ env.PYTHON_VERSION }} |
85 | 84 | - name: Install test dependencies |
86 | 85 | run: uv sync --extra test --frozen |
87 | | - - name: Set up QEMU |
88 | | - uses: docker/setup-qemu-action@v3 |
89 | 86 | - name: Test image |
90 | 87 | run: | |
91 | 88 | export DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:${{ matrix.arch }}-$SHORT_SHA" |
@@ -117,25 +114,22 @@ jobs: |
117 | 114 | - name: Pull AMD image |
118 | 115 | run: | |
119 | 116 | docker pull $DOCKER_BUILD_REPOSITORY:amd64-$SHORT_SHA |
120 | | -# - name: Pull ARM image |
121 | | -# run: | |
122 | | -# docker pull $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA |
| 117 | + - name: Pull ARM image |
| 118 | + run: | |
| 119 | + docker pull $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA |
123 | 120 | - name: Push AMD and ARM tags |
124 | 121 | run: | |
125 | 122 | # these are used to construct the final manifest but also cache-from in subsequent runs |
126 | 123 | docker tag $DOCKER_BUILD_REPOSITORY:amd64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 |
127 | 124 | docker push $DOCKER_BUILD_REPOSITORY:amd64 |
128 | | - #docker tag $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:arm64 |
129 | | - #docker push $DOCKER_BUILD_REPOSITORY:arm64 |
| 125 | + docker tag $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:arm64 |
| 126 | + docker push $DOCKER_BUILD_REPOSITORY:arm64 |
130 | 127 | - name: Push multiarch manifest |
131 | 128 | run: | |
132 | | - #docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
133 | | - docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 |
| 129 | + docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
134 | 130 | docker manifest push $DOCKER_REPOSITORY:latest |
135 | | - #docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
136 | | - docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 |
| 131 | + docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
137 | 132 | docker manifest push $DOCKER_REPOSITORY:$SHORT_SHA |
138 | 133 | VERSION=$(grep -oP '(?<=__version__ = ")[^"]+' prepline_general/api/__version__.py) |
139 | | - #docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
140 | | - docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 |
| 134 | + docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64 |
141 | 135 | docker manifest push ${DOCKER_REPOSITORY}:$VERSION |
0 commit comments