Makefile Dependencies #755
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: Makefile Dependencies | |
on: | |
schedule: | |
# everyday at midnight. | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
inputs: | |
k0s_minor_version: | |
description: 'The minor version of k0s to update the dependencies for' | |
required: false | |
jobs: | |
update-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- name: Setup go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
cache-dependency-path: "**/*.sum" | |
- name: K0s | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
K0S_MINOR_VERSION=$INPUT_K0S_MINOR_VERSION | |
if [ -z "$K0S_MINOR_VERSION" ]; then | |
K0S_MINOR_VERSION=$(make print-K0S_MINOR_VERSION) | |
fi | |
echo "k0s minor version: $K0S_MINOR_VERSION" | |
./scripts/k0s-update-dependencies.sh "$K0S_MINOR_VERSION" | |
- name: Troubleshoot | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
version=$(gh release list --repo replicatedhq/troubleshoot --json name,isLatest | jq -r '.[] | select(.isLatest)|.name') | |
echo "troubleshoot version: $version" | |
sed -i "/^TROUBLESHOOT_VERSION/c\TROUBLESHOOT_VERSION = $version" versions.mk | |
- name: FIO | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
version=$(gh release list --repo axboe/fio --json name,isLatest | jq -r '.[] | select(.isLatest)|.name' | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?') | |
echo "fio version: $version" | |
sed -i "/^FIO_VERSION/c\FIO_VERSION = $version" versions.mk | |
- name: Controller Tools | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
version=$(gh release list --repo kubernetes-sigs/controller-tools --json name,isLatest | jq -r '.[] | select(.isLatest)|.name') | |
echo "controller-tools version: $version" | |
sed -i "/^CONTROLLER_TOOLS_VERSION/c\CONTROLLER_TOOLS_VERSION = $version" versions.mk | |
# update CRDs | |
make -C kinds generate | |
make -C operator manifests | |
- name: Kustomize | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
version=$(gh release list --repo kubernetes-sigs/kustomize --json name,createdAt | jq -r '.[] | select(.name | startswith("kustomize/")) | .name' | head -1 | sed 's/kustomize\///') | |
echo "kustomize version: $version" | |
sed -i "/^KUSTOMIZE_VERSION/c\KUSTOMIZE_VERSION = $version" versions.mk | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
commit-message: Update Makefile versions | |
title: 'Update Makefile versions' | |
branch: automation/update-makefile | |
delete-branch: true | |
labels: | | |
automated-pr | |
makefile | |
type::chore | |
draft: false | |
body: | | |
Automated changes by the [cron-makefile-dependencies](https://github.com/replicatedhq/embedded-cluster/blob/main/.github/workflows/dependencies.yaml) GitHub action |