forked from kubernetes/minikube
-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (155 loc) · 7.97 KB
/
update-iso-image-versions.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: "update-iso-image-versions"
on:
workflow_dispatch:
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.23.3'
permissions:
contents: read
jobs:
update-all:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
with:
go-version: ${{env.GO_VERSION}}
- 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_CRIO=$(DEP=cri-o make get-dependency-version)
OLD_CRUN=$(DEP=crun make get-dependency-version)
OLD_DOCKER=$(DEP=docker make get-dependency-version)
OLD_DOCKER_BUILDX=$(DEP=docker-buildx make get-dependency-version)
OLD_GO=$(DEP=go make get-dependency-version)
OLD_NERDCTL=$(DEP=nerdctl make get-dependency-version)
OLD_NERDCTLD=$(DEP=nerdctld 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
# Uncomment after crictl/cri-o issue resolved: https://github.com/kubernetes/minikube/issues/18359
# make update-cri-o-version
# make update-crictl-version
make update-crun-version
make update-docker-version
# make update-docker-buildx-version
make update-golang-version
# make update-nerdctl-version
# make update-nerdctld-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_CRIO=$(DEP=cri-o make get-dependency-version)
NEW_CRUN=$(DEP=crun make get-dependency-version)
NEW_DOCKER=$(DEP=docker make get-dependency-version)
NEW_DOCKER_BUILDX=$(DEP=docker-buildx make get-dependency-version)
NEW_GO=$(DEP=go make get-dependency-version)
NEW_NERDCTL=$(DEP=nerdctl make get-dependency-version)
NEW_NERDCTLD=$(DEP=nerdctld make get-dependency-version)
NEW_RUNC=$(DEP=runc make get-dependency-version)
NEW_UBUNTU=$(DEP=ubuntu make get-dependency-version)
echo "changelog<<EOF" >> "$GITHUB_OUTPUT"
if [ "$OLD_BUILDKIT" != "$NEW_BUILDKIT" ]; then
echo "### Update BuildKit from $OLD_BUILDKIT to $NEW_BUILDKIT" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/moby/buildkit/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CNI_PLUGINS" != "$NEW_CNI_PLUGINS" ]; then
echo "### Update CNI Plugins from $OLD_CNI_PLUGINS to $NEW_CNI_PLUGINS" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containernetworking/plugins/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CONTAINERD" != "$NEW_CONTAINERD" ]; then
echo "### Update containerd from $OLD_CONTAINERD to $NEW_CONTAINERD" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containerd/containerd/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRICTL" != "$NEW_CRICTL" ]; then
echo "### Update crictl from $OLD_CRICTL to $NEW_CRICTL" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/kubernetes-sigs/cri-tools/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRIO" != "$NEW_CRIO" ]; then
echo "### Update CRI-O from $OLD_CRIO to $NEW_CRIO" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/cri-o/cri-o/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_CRUN" != "$NEW_CRUN" ]; then
echo "### Update crun from $OLD_CRUN to $NEW_CRUN" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containers/crun/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_DOCKER" != "$NEW_DOCKER" ]; then
echo "### Update Docker from $OLD_DOCKER to $NEW_DOCKER" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/moby/moby/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_DOCKER_BUILDX" != "$NEW_DOCKER_BUILDX" ]; then
echo "### Update buildx from $OLD_DOCKER_BUILDX to $NEW_DOCKER_BUILDX" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/docker/buildx/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_GO" != "$NEW_GO" ]; then
echo "### Update Go from $OLD_GO to $NEW_GO" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_NERDCTL" != "$NEW_NERDCTL" ]; then
echo "### Update nerdctl from $OLD_NERDCTL to $NEW_NERDCTL" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/containerd/nerdctl/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_NERDCTLD" != "$NEW_NERDCTLD" ]; then
echo "### Update nerdctld from $OLD_NERDCTLD to $NEW_NERDCTLD" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/afbjorklund/nerdctld/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_RUNC" != "$NEW_RUNC" ]; then
echo "### Update runc from $OLD_RUNC to $NEW_RUNC" >> "$GITHUB_OUTPUT"
echo "[Release notes](https://github.com/opencontainers/runc/releases)" >> "$GITHUB_OUTPUT"
fi
if [ "$OLD_UBUNTU" != "$NEW_UBUNTU" ]; then
echo "### Update Ubuntu from $OLD_UBUNTU to $NEW_UBUNTU" >> "$GITHUB_OUTPUT"
fi
echo "EOF" >> "$GITHUB_OUTPUT"
# 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"
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@5e914681df9dc83aa4e4905692ca88beb2f9e91f
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@60a0d83039c74a4aee543508d2ffcb1c3799cdea
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@60a0d83039c74a4aee543508d2ffcb1c3799cdea
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'
})