Skip to content

Commit

Permalink
- Using separate workflows for each build to work around the nested v…
Browse files Browse the repository at this point in the history
…irtualisation issue
  • Loading branch information
DavidArayan committed Feb 1, 2024
1 parent 3010681 commit 4094348
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 86 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: docker publish amd64
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 .
37 changes: 37 additions & 0 deletions .github/workflows/publish-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: docker publish arm64
on:
push:
tags:
- '*'
jobs:
build-arm64:
runs-on: macos-14
timeout-minutes: 360
steps:
- name: checkout code
uses: actions/checkout@v4
- name: setup docker on macOS
uses: douglascamata/setup-docker-macos-action@v1-alpha
- 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 .
26 changes: 26 additions & 0 deletions .github/workflows/publish-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: docker publish manifest
on:
workflow_run:
workflows: ["docker publish amd64", "docker publish arm64"]
types:
- completed
jobs:
build-manifest:
runs-on: ubuntu-latest
timeout-minutes: 360
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 }}
86 changes: 0 additions & 86 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit 4094348

Please sign in to comment.