- Added Docker to macos13 because its not available for some reason #42
Workflow file for this run
This file contains 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: | |
- '*' | |
jobs: | |
build-amd64: | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: setup qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: print available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: set version from tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: print version number | |
run: echo ${{ env.RELEASE_VERSION }} | |
- name: login to dockerhub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_UPLOAD_USERNAME }} | |
password: ${{ secrets.DOCKER_UPLOAD_TOKEN }} | |
- name: build & upload | |
run: | | |
docker buildx build \ | |
--push \ | |
--tag plattar/python-usd:version-${{ env.RELEASE_VERSION }}-amd64 \ | |
--platform linux/amd64 \ | |
--file Dockerfile . | |
build-arm64: | |
runs-on: macos-13 | |
timeout-minutes: 360 | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: Install Colima & Docker | |
run: | | |
brew install colima | |
brew install docker | |
colima version | |
colima start --cpu 3 --memory 6 --disk 100 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1 | |
- name: setup qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: print available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: set version from tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: print version number | |
run: echo ${{ env.RELEASE_VERSION }} | |
- name: login to dockerhub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_UPLOAD_USERNAME }} | |
password: ${{ secrets.DOCKER_UPLOAD_TOKEN }} | |
- name: build & upload | |
run: | | |
docker buildx build \ | |
--push \ | |
--tag plattar/python-usd:version-${{ env.RELEASE_VERSION }}-arm64 \ | |
--platform linux/arm64 \ | |
--file Dockerfile . | |
build-manifest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
needs: [build-amd64, build-arm64] | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: set version from tag | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: print version number | |
run: echo ${{ env.RELEASE_VERSION }} | |
- name: login to dockerhub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_UPLOAD_USERNAME }} | |
password: ${{ secrets.DOCKER_UPLOAD_TOKEN }} | |
- name: create manifest | |
run: docker manifest create plattar/python-usd:version-${{ env.RELEASE_VERSION }} plattar/python-usd:version-${{ env.RELEASE_VERSION }}-amd64 plattar/python-usd:version-${{ env.RELEASE_VERSION }}-arm64 | |
- name: upload manifest | |
run: docker manifest push plattar/python-usd:version-${{ env.RELEASE_VERSION }} |