Skip to content

build the image and publish on DockerHub #38

build the image and publish on DockerHub

build the image and publish on DockerHub #38

Workflow file for this run

name: build the image and publish on DockerHub
env:
IMAGENAME: buffertly/haproxy-quic
on:
push:
branches: [ "main" ]
schedule:
- cron: '5 18 4 * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: multiarch environment
run: |
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --name multibuilder --driver docker-container --bootstrap
docker buildx use multibuilder
- name: build and push
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASS }}
docker buildx build --label=haproxy.version=$(curl -sk https://raw.githubusercontent.com/haproxy/haproxy/master/VERSION) --platform linux/arm64/v8,linux/amd64 -t $IMAGENAME:latest --push .
deployment:
runs-on: ubuntu-latest
needs: [ build ]
environment: production
steps:
- name: deploy
run: |
curl -s -f -w 'HTTP %{http_code}\n' -X POST ${{ secrets.ZS_WEBHOOK }}