-
Notifications
You must be signed in to change notification settings - Fork 10
63 lines (56 loc) · 1.96 KB
/
Copy pathcaddy.yaml
File metadata and controls
63 lines (56 loc) · 1.96 KB
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-24.04
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- name: Code checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: |
caddy.Containerfile
- name: Setup QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.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.10.2
build-args: |
CADDY_VERSION=2.10.2
CADDY_BUILDER_HASH=sha256:13bf132b50ab5a3abd4d62d4da27a9d8fd98818028746fe85e745d73e3e71f3d
CADDY_HASH=sha256:87aa104ed6c658991e1b0672be271206b7cd9fec452d1bf3ed9ad6f8ab7a2348
- name: Attest
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
id: attest
with:
subject-name: ghcr.io/caddyserver/gateway
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true