Skip to content

Commit e89904f

Browse files
authored
Merge pull request #97 from SovereignCloudStack/syself/write-builder-image-version
🌱 allow renovate to propagate builder image version
2 parents b56c93d + 3c26ded commit e89904f

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)