Skip to content

Update references in README #2

Update references in README

Update references in README #2

name: Build Docker container - HAProxy
on:
push:
branches:
- 'master'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
paths:
- 'hairpin-proxy-haproxy'
- '.github/workflows/container-build-haproxy.yml'
pull_request:
branches:
- 'master'
jobs:
container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/q-m/hairpin-proxy-haproxy
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: hairpin-proxy-haproxy
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,ref=q-m/hairpin-proxy-haproxy
cache-to: type=gha,ref=q-m/hairpin-proxy-haproxy,mode=max