-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (56 loc) · 1.87 KB
/
traefik.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
53
54
55
56
57
58
59
60
61
62
name: Build traefik with OpenSSL
on:
push:
branches:
- master
paths:
- "traefik/**"
- ".github/workflows/traefik.yml"
- ".github/actions/build-docker-image/**"
pull_request:
paths:
- "traefik/**"
- ".github/workflows/traefik.yml"
- ".github/actions/build-docker-image/**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push_to_registry:
name: Build Treafik ${{ matrix.traefik.suffix }} with OpenSSL
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
pull-requests: write
security-events: write
id-token: write
attestations: write
strategy:
fail-fast: false
matrix:
traefik:
- suffix: "v2"
primaryTag: "latest"
- suffix: "v3"
primaryTag: "v3"
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get image version
id: getversion
run: echo "version=$(head -n 1 "traefik/Dockerfile.${{ matrix.traefik.suffix }}" | sed -r -e 's/^([^:]+):([^ @$-]+).*/\2/')" >> "${GITHUB_OUTPUT}"
- name: Build and push image
uses: ./.github/actions/build-docker-image
with:
context: traefik
file: traefik/Dockerfile.${{ matrix.traefik.suffix }}
push: ${{ github.base_ref == null }}
cache-from: type=gha,scope=traefik-${{ matrix.traefik.suffix }}
cache-to: type=gha,mode=max,scope=traefik-${{ matrix.traefik.suffix }}
no-cache: ${{ github.event_name == 'workflow_dispatch' }}
primaryTag: ghcr.io/automattic/vip-container-images/traefik_openssl:${{ matrix.traefik.primaryTag }}
tags: ghcr.io/automattic/vip-container-images/traefik_openssl:${{ steps.getversion.outputs.version }}