Skip to content

Commit 8508a97

Browse files
Merge branch 'Azure:master' into tdum/remove-azurepsdrive-log
2 parents 7d5a881 + 98ea9bb commit 8508a97

File tree

3 files changed

+198
-36
lines changed

3 files changed

+198
-36
lines changed
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
name: Update Pinned Library Versions
2+
3+
on:
4+
schedule:
5+
# Check for updates every 2 weeks (1st and 15th of each month) at 6:00 AM UTC
6+
- cron: '0 6 1,15 * *'
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
check-library-versions:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Get current Istio version
23+
id: current-istio
24+
run: |
25+
CURRENT_VERSION=$(grep 'ENV ISTIO_VERSION=' linux/base.Dockerfile | cut -d'=' -f2)
26+
if [ -z "${CURRENT_VERSION}" ]; then
27+
echo "Error: Unable to determine current Istio version from linux/base.Dockerfile" >&2
28+
exit 1
29+
fi
30+
echo "version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
31+
echo "Current Istio version: ${CURRENT_VERSION}"
32+
33+
- name: Get latest Istio version
34+
id: latest-istio
35+
run: |
36+
set -e
37+
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/istio/istio/releases/latest | jq -er '.tag_name') || {
38+
echo "Error: Failed to fetch latest Istio release information from GitHub API." >&2
39+
exit 1
40+
}
41+
42+
if [ -z "${LATEST_VERSION}" ] || [ "${LATEST_VERSION}" = "null" ]; then
43+
echo "Error: Received empty or invalid latest Istio version from GitHub API." >&2
44+
exit 1
45+
fi
46+
47+
echo "version=${LATEST_VERSION}" >> $GITHUB_OUTPUT
48+
echo "Latest Istio version: ${LATEST_VERSION}"
49+
50+
- name: Compare Istio versions
51+
id: compare-istio
52+
run: |
53+
CURRENT="${{ steps.current-istio.outputs.version }}"
54+
LATEST="${{ steps.latest-istio.outputs.version }}"
55+
56+
if [ "${CURRENT}" != "${LATEST}" ]; then
57+
echo "needs_update=true" >> $GITHUB_OUTPUT
58+
echo "Istio update needed: ${CURRENT} -> ${LATEST}"
59+
else
60+
echo "needs_update=false" >> $GITHUB_OUTPUT
61+
echo "Istio already on latest version: ${CURRENT}"
62+
fi
63+
64+
- name: Get current RootlessKit version
65+
id: current-rootlesskit
66+
run: |
67+
CURRENT_VERSION=$(grep 'ROOTLESSKIT_VERSION=' linux/base.Dockerfile | grep -o 'v[0-9.]*')
68+
if [ -z "${CURRENT_VERSION}" ]; then
69+
echo "Error: Unable to determine current RootlessKit version from linux/base.Dockerfile" >&2
70+
exit 1
71+
fi
72+
echo "version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
73+
echo "Current RootlessKit version: ${CURRENT_VERSION}"
74+
75+
- name: Get latest RootlessKit version
76+
id: latest-rootlesskit
77+
run: |
78+
set -e
79+
LATEST_VERSION=$(curl -fsSL https://api.github.com/repos/rootless-containers/rootlesskit/releases/latest | jq -er '.tag_name') || {
80+
echo "Error: Failed to fetch latest RootlessKit release information from GitHub API." >&2
81+
exit 1
82+
}
83+
84+
if [ -z "${LATEST_VERSION}" ] || [ "${LATEST_VERSION}" = "null" ]; then
85+
echo "Error: Received empty or invalid latest RootlessKit version from GitHub API." >&2
86+
exit 1
87+
fi
88+
89+
echo "version=${LATEST_VERSION}" >> $GITHUB_OUTPUT
90+
echo "Latest RootlessKit version: ${LATEST_VERSION}"
91+
92+
- name: Compare RootlessKit versions
93+
id: compare-rootlesskit
94+
run: |
95+
CURRENT="${{ steps.current-rootlesskit.outputs.version }}"
96+
LATEST="${{ steps.latest-rootlesskit.outputs.version }}"
97+
98+
if [ "${CURRENT}" != "${LATEST}" ]; then
99+
echo "needs_update=true" >> $GITHUB_OUTPUT
100+
echo "RootlessKit update needed: ${CURRENT} -> ${LATEST}"
101+
else
102+
echo "needs_update=false" >> $GITHUB_OUTPUT
103+
echo "RootlessKit already on latest version: ${CURRENT}"
104+
fi
105+
106+
- name: Update Istio in Dockerfile
107+
if: steps.compare-istio.outputs.needs_update == 'true'
108+
run: |
109+
LATEST="${{ steps.latest-istio.outputs.version }}"
110+
111+
# Ensure the expected ENV ISTIO_VERSION line exists before attempting to update
112+
if ! grep -q '^ENV ISTIO_VERSION=' linux/base.Dockerfile; then
113+
echo "Error: Could not find 'ENV ISTIO_VERSION=' line in linux/base.Dockerfile"
114+
exit 1
115+
fi
116+
117+
sed -i "s/^ENV ISTIO_VERSION=.*/ENV ISTIO_VERSION=${LATEST}/" linux/base.Dockerfile
118+
119+
# Verify that the update was applied successfully
120+
if ! grep -q "^ENV ISTIO_VERSION=${LATEST}$" linux/base.Dockerfile; then
121+
echo "Error: Failed to update ISTIO_VERSION to ${LATEST} in linux/base.Dockerfile"
122+
exit 1
123+
fi
124+
echo "Updated ISTIO_VERSION to ${LATEST}"
125+
126+
- name: Update RootlessKit in Dockerfile
127+
if: steps.compare-rootlesskit.outputs.needs_update == 'true'
128+
run: |
129+
LATEST="${{ steps.latest-rootlesskit.outputs.version }}"
130+
131+
if ! grep -q 'ROOTLESSKIT_VERSION=' linux/base.Dockerfile; then
132+
echo "Error: Could not find 'ROOTLESSKIT_VERSION=' line in linux/base.Dockerfile"
133+
exit 1
134+
fi
135+
136+
sed -i "s/ROOTLESSKIT_VERSION=v[0-9.]*/ROOTLESSKIT_VERSION=${LATEST}/" linux/base.Dockerfile
137+
138+
if ! grep -q "ROOTLESSKIT_VERSION=${LATEST}" linux/base.Dockerfile; then
139+
echo "Error: Failed to update ROOTLESSKIT_VERSION to ${LATEST} in linux/base.Dockerfile"
140+
exit 1
141+
fi
142+
echo "Updated ROOTLESSKIT_VERSION to ${LATEST}"
143+
144+
- name: Create and push branch with updates
145+
if: steps.compare-istio.outputs.needs_update == 'true' || steps.compare-rootlesskit.outputs.needs_update == 'true'
146+
run: |
147+
BRANCH_NAME="update-pinned-libs-$(date +%Y%m%d)"
148+
git config user.name "github-actions[bot]"
149+
git config user.email "github-actions[bot]@users.noreply.github.com"
150+
git checkout -b "$BRANCH_NAME"
151+
git add linux/base.Dockerfile
152+
git commit -m "Upkeep: Update pinned library versions"
153+
git push origin "$BRANCH_NAME"
154+
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
155+
id: push-branch
156+
157+
- name: Create Pull Request
158+
if: steps.compare-istio.outputs.needs_update == 'true' || steps.compare-rootlesskit.outputs.needs_update == 'true'
159+
env:
160+
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
161+
run: |
162+
CURRENT_ISTIO="${{ steps.current-istio.outputs.version }}"
163+
LATEST_ISTIO="${{ steps.latest-istio.outputs.version }}"
164+
CURRENT_ROOTLESSKIT="${{ steps.current-rootlesskit.outputs.version }}"
165+
LATEST_ROOTLESSKIT="${{ steps.latest-rootlesskit.outputs.version }}"
166+
BRANCH_NAME="${{ steps.push-branch.outputs.branch }}"
167+
168+
UPDATES=""
169+
RELEASE_NOTES=""
170+
171+
if [ "${{ steps.compare-istio.outputs.needs_update }}" == "true" ]; then
172+
UPDATES="${UPDATES}- **Istio**: ${CURRENT_ISTIO} to ${LATEST_ISTIO}\n"
173+
RELEASE_NOTES="${RELEASE_NOTES}- Istio ${LATEST_ISTIO}: https://github.com/istio/istio/releases/tag/${LATEST_ISTIO}\n"
174+
fi
175+
176+
if [ "${{ steps.compare-rootlesskit.outputs.needs_update }}" == "true" ]; then
177+
UPDATES="${UPDATES}- **RootlessKit**: ${CURRENT_ROOTLESSKIT} to ${LATEST_ROOTLESSKIT}\n"
178+
RELEASE_NOTES="${RELEASE_NOTES}- RootlessKit ${LATEST_ROOTLESSKIT}: https://github.com/rootless-containers/rootlesskit/releases/tag/${LATEST_ROOTLESSKIT}\n"
179+
fi
180+
181+
gh pr create \
182+
--title "chore: update pinned library versions" \
183+
--body "## Automated Library Version Updates
184+
185+
This PR updates the following pinned library versions:
186+
187+
${UPDATES}
188+
### Changes
189+
- Updated version variables in linux/base.Dockerfile
190+
191+
### Release Notes
192+
${RELEASE_NOTES}
193+
---
194+
This PR was automatically created by the Update Pinned Library Versions workflow." \
195+
--base master \
196+
--head "${BRANCH_NAME}" \
197+
--label "version_upgrade,automated_pr"

linux/base.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ RUN chmod 755 /usr/local/bin/ansible* \
172172

173173

174174
# Install specific version of Istio from GitHub releases
175-
ENV ISTIO_VERSION=1.28.1
175+
ENV ISTIO_VERSION=1.28.2
176176
RUN export TMP_DIR=$(mktemp -d) \
177177
&& cd "${TMP_DIR}" \
178178
&& curl -L https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz -o istio.tar.gz \

tests/command_list

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ applygnupgdefaults
3535
apropos
3636
ar
3737
arch
38-
aria_s3_copy
3938
arp
4039
arpaname
4140
arping
@@ -766,34 +765,14 @@ mapfile
766765
mariadb
767766
mariadb-access
768767
mariadb-admin
769-
mariadb-backup
770768
mariadb-binlog
771769
mariadb-check
772-
mariadb-client-test
773-
mariadb-client-test-embedded
774-
mariadb-conv
775-
mariadb-convert-table-format
776-
mariadbd-multi
777-
mariadbd-safe
778-
mariadbd-safe-helper
779770
mariadb-dump
780-
mariadb-dumpslow
781-
mariadb-embedded
782771
mariadb-find-rows
783-
mariadb-fix-extensions
784-
mariadb-hotcopy
785772
mariadb-import
786-
mariadb-install-db
787-
mariadb-ldb
788773
mariadb-plugin
789-
mariadb-secure-installation
790-
mariadb-setpermission
791774
mariadb-show
792775
mariadb-slap
793-
mariadb-test
794-
mariadb-test-embedded
795-
mariadb-tzinfo-to-sql
796-
mariadb-upgrade
797776
mariadb-waitpid
798777
matchpathcon
799778
mcookie
@@ -850,30 +829,18 @@ mv
850829
mvn
851830
mvnDebug
852831
mvnyjp
853-
myrocks_hotbackup
854832
mysql
855833
mysqlaccess
856834
mysqladmin
857835
mysqlbinlog
858836
mysqlcheck
859-
mysql_client_test
860-
mysql_client_test_embedded
861-
mysql_convert_table_format
862837
mysqldump
863-
mysql_embedded
864838
mysql_find_rows
865-
mysql_fix_extensions
866839
mysqlimport
867-
mysql_ldb
868840
mysql_plugin
869-
mysql_setpermission
870841
mysqlshow
871842
mysqlslap
872-
mysqltest
873-
mysqltest_embedded
874-
mysql_upgrade
875843
mysql_waitpid
876-
mytop
877844
named-checkzone
878845
named-compilezone
879846
named-nzd2nzf
@@ -944,7 +911,6 @@ peekfd
944911
perl
945912
perl5.38.2
946913
perldoc
947-
perror
948914
pfbtops
949915
pg_amcheck
950916
pg_archivecleanup
@@ -1199,7 +1165,6 @@ ssh-agent
11991165
ssh-copy-id
12001166
ssh-keygen
12011167
ssh-keyscan
1202-
sst_dump
12031168
start-puppet-agent
12041169
stat
12051170
stdbuf

0 commit comments

Comments
 (0)