Skip to content

Commit 3c26ded

Browse files
kranurag7kranurag7
authored andcommitted
allow renovate to propagate builder image version
As of now, renovate only populates the updated version in github workflows but don't write to .builder-image-version.txt which is the main part. This commit fixes the same. Signed-off-by: kranurag7 <[email protected]>
1 parent b56c93d commit 3c26ded

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/schedule-update-bot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
RENOVATE_HOST_RULES: '[{"hostType": "docker", "matchHost": "ghcr.io", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
5151
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '[".*"]'
5252
BUILDER_IMAGE: 'ghcr.io/sovereigncloudstack/cso'
53-
RENOVATE_POST_UPGRADE_TASKS: '{ commands: ["BUILD_IMAGE_TOKEN=${{ secrets.GITHUB_TOKEN }} BUILD_IMAGE_USER=${{ github.actor }} CI=true ./hack/upgrade-builder-image.sh"], fileFilters: ["Makefile", ".github/**/*.yml", ".github/**/*.yaml"], executionMode: "branch"}'
53+
RENOVATE_POST_UPGRADE_TASKS: '{ commands: ["BUILD_IMAGE_TOKEN=${{ secrets.GITHUB_TOKEN }} BUILD_IMAGE_USER=${{ github.actor }} CI=true ./hack/upgrade-builder-image.sh"], fileFilters: ["Makefile", ".builder-image-version.txt", ".github/**/*.yml", ".github/**/*.yaml"], executionMode: "branch"}'
5454
with:
5555
configurationFile: ${{ env.RENOVATE_CONFIG_FILE }}
5656
token: "x-access-token:${{ steps.generate-token.outputs.token }}"

hack/upgrade-builder-image.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ fi
3838
export VERSION=$(git fetch --quiet origin main && git show origin/main:.builder-image-version.txt)
3939
export NEW_VERSION=$(semver_upgrade patch ${VERSION})
4040

41+
echo "$NEW_VERSION" > .builder-image-version.txt
42+
echo "Wrote new version $NEW_VERSION to .builder-image-version.txt"
43+
4144
if docker manifest inspect ghcr.io/sovereigncloudstack/cso-builder:${VERSION} > /dev/null ; echo $?; then
4245

4346
sed -i -e "/^BUILDER_IMAGE_VERSION /s/:=.*$/:= ${NEW_VERSION}/" Makefile

0 commit comments

Comments
 (0)