Skip to content

bizhost

bizhost #109

Workflow file for this run

name: Docker Build
'on':
push:
tags: [ '*.*.*-*' ]
branches: [ main ]
pull_request:
branches: [ main ]
env:
DOCKER_IMAGE: etriasnl/varnish
jobs:
build:
strategy:
matrix:
runner: [ ubuntu-latest, ubuntu-bizhost ]
runs-on: ${{ matrix.runner }}
steps:
-
uses: actions/[email protected]
-
uses: docker/[email protected]
-
id: build
uses: docker/[email protected]
with:
context: .
load: true
# https://docs.docker.com/build/ci/github-actions/cache/#github-cache
cache-from: type=gha
cache-to: type=gha,mode=max
-
run: |
docker run --rm --entrypoint=sh "${{ steps.build.outputs.imageid }}"
push:
needs: [ build ]
runs-on: ubuntu-bizhost
if: github.ref_type == 'tag'
steps:
-
uses: actions/[email protected]
-
uses: docker/[email protected]
-
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
-
id: meta
uses: docker/[email protected]
with:
images: ${{ env.DOCKER_IMAGE }}
-
uses: docker/[email protected]
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}