Update buildx workflow
Buildx workflow now waits for tests to pass before building/uploading new images. There's also a separate step for building a properly formatted tag image if triggered by a new tag.main
parent
334aabacb7
commit
60b36c3b19
|
@ -1,13 +1,19 @@
|
||||||
name: buildx
|
name: buildx
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
branches: main
|
workflows: ["tests"]
|
||||||
|
branches: [main]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
on-success:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Wait for tests to succeed
|
||||||
|
if: ${{ github.event.workflow_run.conclusion != 'success' }}
|
||||||
|
run: exit 1
|
||||||
- name: checkout code
|
- name: checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: install buildx
|
- name: install buildx
|
||||||
|
@ -26,3 +32,11 @@ jobs:
|
||||||
docker buildx build --push \
|
docker buildx build --push \
|
||||||
--tag benbusby/whoogle-search:latest \
|
--tag benbusby/whoogle-search:latest \
|
||||||
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||||
|
- name: build and push tag
|
||||||
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
|
run: |
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
docker buildx ls
|
||||||
|
docker buildx build --push \
|
||||||
|
--tag benbusby/whoogle-search:${GITHUB_REF#refs/*/v}\
|
||||||
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
name: pypi
|
name: pypi
|
||||||
|
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
branches: main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-test:
|
publish-test:
|
||||||
|
|
Loading…
Reference in New Issue