-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Using separate workflows for each build to work around the nested v…
…irtualisation issue
- Loading branch information
1 parent
3010681
commit 4094348
Showing
4 changed files
with
98 additions
and
86 deletions.
There are no files selected for viewing
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
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 . |
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
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 . |
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
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 }} |
This file was deleted.
Oops, something went wrong.