-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (44 loc) · 1.23 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}