Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update image deps | |
on: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
inputs: | |
k0s-version: | |
description: 'K0s version for discovering image versions' | |
required: false | |
overwrite: | |
description: 'Overwrite the existing image tags' | |
required: false | |
default: 'true' | |
push: | |
branches: | |
- emosbaugh/sc-108755/use-chainguard-images-for-embedded-cluster | |
jobs: | |
build-3rd-party-images: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get tags from wolfi repo | |
id: get-tags-from-apkindex | |
run: | | |
set -euo pipefail | |
# We're only using the APKINDEX files to get the versions, so it doesn't matter which arch we use | |
curl -LO --fail --show-error https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz | |
tar -xzvf APKINDEX.tar.gz | |
calico_node_version=$(< APKINDEX grep -A1 "^P:calico-node" | tail -n 1 | sed -n -e 's/V://p' | tr -d '\n') | |
sed "s/__CALICO_NODE_VERSION__/$calico_node_version/g" deploy/images/calico-node/apko.tmpl.yaml > deploy/images/calico-node/apko.yaml | |
{ | |
echo "calico-node-tag=$calico_node_version" | |
} >> "$GITHUB_OUTPUT" | |
- name: Get tags from k0s | |
id: get-tags-from-k0s | |
run: | | |
set -euo pipefail | |
# We're only using the APKINDEX fi | |
if [ -n "${{ github.event.inputs.k0s-version }}" ]; then | |
make pkg/goods/bins/k0s K0S_VERSION="${{ github.event.inputs.k0s-version }}" K0S_BINARY_SOURCE_OVERRIDE= | |
else | |
make pkg/goods/bins/k0s | |
fi | |
coredns_version=$(pkg/goods/bins/k0s airgap list-images --all | grep coredns: | awk -F':' '{ print $2 }') | |
sed "s/__COREDNS_VERSION__/$coredns_version/g" deploy/images/coredns/apko.tmpl.yaml > deploy/images/coredns/apko.yaml | |
{ | |
echo "coredns-tag=$coredns_version" | |
} >> "$GITHUB_OUTPUT" | |
- name: Build and push calico-node image | |
uses: ./.github/actions/build-dep-image-with-apko | |
with: | |
apko-config: deploy/images/calico-node/apko.yaml | |
image-name: ttl.sh/ec/calico-node:${{ steps.get-tags-from-apkindex.outputs.calico-node-tag }} | |
# registry-username: ${{ secrets.REGISTRY_USERNAME_STAGING }} | |
# registry-password: ${{ secrets.REGISTRY_PASSWORD_STAGING }} | |
overwrite: true # ${{ github.event.inputs.overwrite }} | |
- name: Build and push coredns image | |
uses: ./.github/actions/build-dep-image-with-apko | |
with: | |
apko-config: deploy/images/coredns/apko.yaml | |
image-name: ttl.sh/ec/coredns:${{ steps.get-tags-from-k0s.outputs.coredns-tag }} | |
# registry-username: ${{ secrets.REGISTRY_USERNAME_STAGING }} | |
# registry-password: ${{ secrets.REGISTRY_PASSWORD_STAGING }} | |
overwrite: true # ${{ github.event.inputs.overwrite }} |