Skip to content

Fix ghcr login

Fix ghcr login #32

Workflow file for this run

name: build
on:
push:
tags:
- 20*
workflow_dispatch:
env:
GHCR_IMAGE: ghcr.io/emgag/varnish
GHCR_USER: emgag-service
CONTAINER_PLATFORMS: "linux/amd64,linux/arm64"
jobs:
build:
strategy:
matrix:
version: ["6.0", "7.2", "7.3"]
include:
- version: "6.0"
tag: "6.0.11-1"
- version: "7.2"
tag: "7.2.1-1"
- version: "7.3"
tag: "7.3.0-1"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to github docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build varnish {{ matrix.version }}
run: >
docker buildx build --pull --push
-t ${{ env.GHCR_IMAGE }}:${{ matrix.tag }}
--platform ${{ env.CONTAINER_PLATFORMS }}
${{ matrix.version }}