5
5
- cron : ' 0 4 * * *'
6
6
workflow_dispatch :
7
7
inputs :
8
+ k0s-version :
9
+ description : ' K0s version for discovering image versions'
10
+ required : false
8
11
overwrite :
9
12
description : ' Overwrite the existing image tags'
10
13
required : false
19
22
- name : Checkout
20
23
uses : actions/checkout@v4
21
24
22
- - name : Get tags
23
- id : get-tags
25
+ - name : Get tags from wolfi repo
26
+ id : get-tags-from-apkindex
24
27
run : |
25
28
set -euo pipefail
26
29
@@ -37,11 +40,40 @@ jobs:
37
40
echo "calico-node-tag=$calico_node_version"
38
41
} >> "$GITHUB_OUTPUT"
39
42
43
+ - name : Get tags from k0s
44
+ id : get-tags-from-k0s
45
+ run : |
46
+ set -euo pipefail
47
+
48
+ # We're only using the APKINDEX fi
49
+ if [ -n "${{ github.event.inputs.k0s-version }}" ]; then
50
+ make pkg/goods/bins/k0s K0S_VERSION="${{ github.event.inputs.k0s-version }}" K0S_BINARY_SOURCE_OVERRIDE=
51
+ else
52
+ make pkg/goods/bins/k0s
53
+ fi
54
+
55
+ coredns_version=$(pkg/goods/bins/k0s airgap list-images --all | grep coredns: | awk -F':' '{ print $2 }')
56
+
57
+ sed "s/__COREDNS_VERSION__/$coredns_version/g" deploy/images/coredns/apko.tmpl.yaml > deploy/images/coredns/apko.yaml
58
+
59
+ {
60
+ echo "coredns-tag=$coredns_version"
61
+ } >> "$GITHUB_OUTPUT"
62
+
40
63
- name : Build and push calico-node image
41
64
uses : ./.github/actions/build-dep-image-with-apko
42
65
with :
43
66
apko-config : deploy/images/calico-node/apko.yaml
44
- image-name : ttl.sh/ec/calico-node:${{ steps.get-tags.outputs.calico-node-tag }}
67
+ image-name : ttl.sh/ec/calico-node:${{ steps.get-tags-from-apkindex.outputs.calico-node-tag }}
68
+ # registry-username: ${{ secrets.REGISTRY_USERNAME_STAGING }}
69
+ # registry-password: ${{ secrets.REGISTRY_PASSWORD_STAGING }}
70
+ overwrite : true # ${{ github.event.inputs.overwrite }}
71
+
72
+ - name : Build and push coredns image
73
+ uses : ./.github/actions/build-dep-image-with-apko
74
+ with :
75
+ apko-config : deploy/images/coredns/apko.yaml
76
+ image-name : ttl.sh/ec/coredns:${{ steps.get-tags-from-k0s.outputs.coredns-tag }}
45
77
# registry-username: ${{ secrets.REGISTRY_USERNAME_STAGING }}
46
78
# registry-password: ${{ secrets.REGISTRY_PASSWORD_STAGING }}
47
79
overwrite : true # ${{ github.event.inputs.overwrite }}
0 commit comments