-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (40 loc) · 1.29 KB
/
build.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
---
name: "Build"
on:
push:
tags:
- "*"
permissions:
contents: "read"
id-token: "write"
packages: "write"
jobs:
image:
name: "Container Image"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
id: "checkout"
uses: "actions/checkout@v4"
- name: "Setup Dagger"
id: "setup-dagger"
uses: "./.github/actions/setup-dagger"
with:
cloudToken: "${{ secrets.DAGGER_CLOUD_TOKEN }}"
cacheServiceToken: "${{ secrets.DAGGER_CACHE_SERVICE_TOKEN }}"
- name: "Build container image"
id: "build-image"
run: |
dagger call publish --registry 'ghcr.io' --username '${{ github.actor }}' --password '${{ github.token }}' --repository '${{ github.repository_owner }}/varnish' --tag '${{ github.ref_name }}'
- name: "Delete old container images"
id: "delete-old-images"
uses: "actions/delete-package-versions@v5"
with:
package-name: "varnish"
package-type: "container"
min-versions-to-keep: 0
delete-only-untagged-versions: true
# NOTE: Composite actions cannot add post steps, so add them explicitly.
- name: "Post Setup Dagger"
id: "post-setup-dagger"
uses: "./.github/actions/post-setup-dagger"