Skip to content

chore(deps): Bump docker/setup-qemu-action from 2 to 3 (#76) #203

chore(deps): Bump docker/setup-qemu-action from 2 to 3 (#76)

chore(deps): Bump docker/setup-qemu-action from 2 to 3 (#76) #203

Workflow file for this run

---
name: Docker
on:
push:
branches: [ main, dev ]
tags: [ v* ]
pull_request:
branches: [ main ]
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
quentinb69/go-forward-auth
tags: |
type=ref,event=branch,value={{branch}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup QEMU
uses: docker/setup-qemu-action@v3
-
name: Setup Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: test
-
name: Test Docker Image
run: |
docker run --rm -d --name test test > /dev/null 2>&1
sleep 2 && ret=0
docker logs test 2>&1 | grep -i "Loading Server" || ret=$?
docker rm -f test > /dev/null 2>&1
exit $ret
-
name: Build and Push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}