-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (56 loc) · 1.96 KB
/
caddy.yaml
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
63
name: Caddy
on:
push:
branches:
- master
paths:
- caddy.Containerfile
jobs:
build-image:
name: Build Image
runs-on: ubuntu-22.04
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- name: Code checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
sparse-checkout: |
caddy.Containerfile
- name: Setup QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push image
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
id: push
env:
# ref; https://docs.docker.com/build/ci/github-actions/reproducible-builds/
SOURCE_DATE_EPOCH: 0
with:
context: .
file: ./caddy.Containerfile
platforms: linux/amd64,linux/arm64
push: true
sbom: true
tags: ghcr.io/caddyserver/gateway:caddy-2.8.4
build-args: |
CADDY_VERSION=2.8.4
CADDY_BUILDER_HASH=sha256:55508f3d559b518d77d8ad453453c02ef616d7697c2a1503feb091123e9751c8
CADDY_HASH=sha256:51b5e778a16d77474c37f8d1d966e6863cdb1c7478396b04b806169fed0abac9
- name: Attest
uses: actions/attest-build-provenance@210c1913531870065f03ce1f9440dd87bc0938cd # v1.4.0
id: attest
with:
subject-name: ghcr.io/caddyserver/gateway
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true