Upgrade UFG version and enable Draco PIC for AArch64 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: docker publish | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image_tag: ${{ steps.derive.outputs.image_tag }} | |
| image_name: ${{ steps.derive.outputs.image_name }} | |
| steps: | |
| - name: derive build parameters | |
| id: derive | |
| run: | | |
| set -euo pipefail | |
| image_tag="${GITHUB_REF#refs/tags/}" | |
| image_name="$(echo "${{ github.repository_owner }}/python-xrutils" | tr '[:upper:]' '[:lower:]')" | |
| echo "image_tag=$image_tag" >> "$GITHUB_OUTPUT" | |
| echo "image_name=$image_name" >> "$GITHUB_OUTPUT" | |
| echo "Building -> ${{ env.REGISTRY }}/${image_name}:${image_tag}" | |
| echo " OpenUSD base is pinned in the Dockerfile (USD_VERSION ARG default)." | |
| build: | |
| needs: setup | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 360 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: prepare platform pair | |
| run: | | |
| platform="${{ matrix.platform }}" | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> "$GITHUB_ENV" | |
| - name: checkout code | |
| uses: actions/checkout@v4 | |
| - name: setup buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: ${{ matrix.platform }} | |
| labels: | | |
| org.opencontainers.image.title=python-xrutils | |
| org.opencontainers.image.version=${{ needs.setup.outputs.image_tag }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| outputs: type=image,name=${{ env.REGISTRY }}/${{ needs.setup.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true | |
| - name: export digest | |
| run: | | |
| mkdir -p /tmp/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "/tmp/digests/${digest#sha256:}" | |
| - name: upload digest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: digests-${{ env.PLATFORM_PAIR }} | |
| path: /tmp/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| merge: | |
| needs: [setup, build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: download digests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: /tmp/digests | |
| pattern: digests-* | |
| merge-multiple: true | |
| - name: setup buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: create multi-arch manifest | |
| working-directory: /tmp/digests | |
| run: | | |
| set -euo pipefail | |
| image="${{ env.REGISTRY }}/${{ needs.setup.outputs.image_name }}" | |
| tag="${{ needs.setup.outputs.image_tag }}" | |
| # shellcheck disable=SC2046 | |
| docker buildx imagetools create \ | |
| -t "${image}:version-${tag}" \ | |
| -t "${image}:${tag}" \ | |
| -t "${image}:latest" \ | |
| $(printf "${image}@sha256:%s " *) | |
| - name: inspect | |
| run: | | |
| docker buildx imagetools inspect \ | |
| ${{ env.REGISTRY }}/${{ needs.setup.outputs.image_name }}:${{ needs.setup.outputs.image_tag }} |