mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-03-11 08:54:34 +00:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
name: buildx
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["docker_main"]
|
|
branches: [live]
|
|
types:
|
|
- completed
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
on-success:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Wait for tests to succeed
|
|
if: ${{ github.event.workflow_run.conclusion != 'success' && startsWith(github.ref, 'refs/tags') != true }}
|
|
run: exit 1
|
|
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
|
|
|
- name: Login to ghcr.io
|
|
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: build and push the image
|
|
if: startsWith(github.ref, 'refs/heads/live') && github.actor == 'royaloughtness'
|
|
run: |
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
docker buildx ls
|
|
docker buildx build --push \
|
|
--tag ghcr.io/royaloughtness/whoogle-search:latest \
|
|
--platform linux/amd64,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 ghcr.io/royaloughtness/whoogle-search:${GITHUB_REF#refs/*/v}\
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|