Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add job to update all ISO/Kicbase deps #17489

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/update-iso-image-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: "update-iso-image-versions"
on:
workflow_dispatch:
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.21.3'
permissions:
contents: read
jobs:
update-all:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{env.GO_VERSION}}
cache-dependency-path: ./go.sum
- name: Bump versions
id: bumpVersions
run: |
OLD_BUILDKIT=$(DEP=buildkit make get-dependency-version)
OLD_CNI_PLUGINS=$(DEP=cni-plugins make get-dependency-version)
OLD_CONTAINERD=$(DEP=containerd make get-dependency-version)
OLD_CRICTL=$(DEP=crictl make get-dependency-version)
OLD_DOCKER=$(DEP=docker make get-dependency-version)
OLD_NERDCTL=$(DEP=nerdctl make get-dependency-version)
OLD_RUNC=$(DEP=runc make get-dependency-version)
OLD_UBUNTU=$(DEP=ubuntu make get-dependency-version)
make update-buildkit-version
make update-cni-plugins-version
make update-containerd-version
make update-crictl-version
make update-docker-version
make update-nerdctl-version
make update-runc-version
make update-ubuntu-version
NEW_BUILDKIT=$(DEP=buildkit make get-dependency-version)
NEW_CNI_PLUGINS=$(DEP=cni-plugins make get-dependency-version)
NEW_CONTAINERD=$(DEP=containerd make get-dependency-version)
NEW_CRICTL=$(DEP=crictl make get-dependency-version)
NEW_DOCKER_BUILDX=$(DEP=docker-buildx make get-dependency-version)
NEW_DOCKER=$(DEP=docker make get-dependency-version)
NEW_NERDCTL=$(DEP=nerdctl make get-dependency-version)
NEW_RUNC=$(DEP=runc make get-dependency-version)
NEW_UBUNTU=$(DEP=ubuntu make get-dependency-version)
if [ "$OLD_BUILDKIT" != "$NEW_BUILDKIT" ]; then
echo "changelog=https://github.com/moby/buildkit/releases/tag/$NEW_BUILDKIT" >> $GITHUB_OUTPUT
fi
if [ "$OLD_CNI_PLUGINS" != "$NEW_CNI_PLUGINS" ]; then
echo "changelog=https://github.com/containernetworking/plugins/releases/tag/$NEW_CNI_PLUGINS" >> $GITHUB_OUTPUT
fi
if [ "$OLD_CONTAINERD" != "$NEW_CONTAINERD" ]; then
echo "changelog=https://github.com/containerd/containerd/releases/tag/$NEW_CONTAINERD" >> $GITHUB_OUTPUT
fi
if [ "$OLD_CRICTL" != "$NEW_CRICTL" ]; then
echo "changelog=https://github.com/kubernetes-sigs/cri-tools/releases/tag/$NEW_CRICTL" >> $GITHUB_OUTPUT
fi
if [ "$OLD_DOCKER" != "$NEW_DOCKER" ]; then
echo "changelog=https://github.com/moby/moby/releases/tag/v$NEW_DOCKER" >> $GITHUB_OUTPUT
fi
if [ "$OLD_NERDCTL" != "$NEW_NERDCTL" ]; then
echo "changelog=https://github.com/containerd/nerdctl/releases/tag/v$NEW_NERDCTL" >> $GITHUB_OUTPUT
fi
if [ "$OLD_RUNC" != "$NEW_RUNC" ]; then
echo "changelog=https://github.com/opencontainers/runc/releases/tag/$NEW_RUNC" >> $GITHUB_OUTPUT
fi
# The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
echo "changes<<EOF" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we include the link to the upstream changes in the PR description ?

echo "$(git status --porcelain)" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create PR
id: createPR
if: ${{ steps.bumpVersions.outputs.changes != '' }}
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: 'Kicbase/ISO: Update dependency versions'
committer: minikube-bot <[email protected]>
author: minikube-bot <[email protected]>
branch: bump_iso_image_versions
branch-suffix: short-commit-hash
push-to-fork: minikube-bot/minikube
base: master
delete-branch: true
title: 'Kicbase/ISO: Update dependency versions'
body: |
Changelog:
${{ steps.bumpVersions.outputs.changelog }}
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
if: ${{ steps.bumpVersions.outputs.changes != '' }}
with:
github-token: ${{ secrets.MINIKUBE_BOT_PAT }}
script: |
github.rest.issues.createComment({
issue_number: ${{ steps.createPR.outputs.pull-request-number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: 'ok-to-build-image'
})
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
if: ${{ steps.bumpVersions.outputs.changes != '' }}
with:
github-token: ${{ secrets.MINIKUBE_BOT_PAT }}
script: |
github.rest.issues.createComment({
issue_number: ${{ steps.createPR.outputs.pull-request-number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: 'ok-to-build-iso'
})
4 changes: 2 additions & 2 deletions .github/workflows/update-kong-ingress-controller-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- cron: "0 10 * * 1"
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.3'
permissions:
contents: read

jobs:
bump-kong-ingress-controller-version:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{env.GO_VERSION}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-kong-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- cron: "0 10 * * 1"
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.21.1'
GO_VERSION: '1.21.3'
permissions:
contents: read

jobs:
bump-kong-version:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{env.GO_VERSION}}
Expand Down
Loading