Schedule - Update Bot #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Schedule - Update Bot | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
description: "Dry-Run" | |
default: "false" | |
required: false | |
logLevel: | |
description: "Log-Level" | |
default: "debug" | |
required: false | |
schedule: | |
- cron: "0 11 * * *" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/renovate.json5" | |
- ".github/renovate/**.json" | |
env: | |
LOG_LEVEL: info | |
DRY_RUN: false | |
RENOVATE_CONFIG_FILE: .github/renovate.json5 | |
# yamllint disable rule:line-length | |
jobs: | |
update-bot: | |
if: github.repository == 'SovereignCloudStack/cluster-stack-provider-openstack' | |
name: Renovate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
# qemu is not required as of now because we don't build images for arm64 | |
# use docker/setup-qemu-action@v3 if you want to have arm64 images. | |
- name: Set up Docker Buildx # required for building image | |
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3 | |
- name: Generate Token | |
uses: actions/create-github-app-token@c8f55efbd427e7465d6da1106e7979bc8aaee856 # v1 | |
id: generate-token | |
with: | |
app-id: ${{ secrets.SCS_APP_ID }} | |
private-key: ${{ secrets.SCS_APP_PRIVATE_KEY }} | |
- name: Override default config from dispatch variables | |
run: | | |
echo "DRY_RUN=${{ github.event.inputs.dryRun || env.DRY_RUN }}" >> "$GITHUB_ENV" | |
echo "LOG_LEVEL=${{ github.event.inputs.logLevel || env.LOG_LEVEL }}" >> "$GITHUB_ENV" | |
- name: Renovate | |
uses: renovatebot/github-action@063e0c946b9c1af35ef3450efc44114925d6e8e6 # v40.1.11 | |
env: | |
RENOVATE_HOST_RULES: '[{"hostType": "docker", "matchHost": "ghcr.io", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]' | |
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '[".*"]' | |
BUILDER_IMAGE: 'ghcr.io/sovereigncloudstack/cspo-builder' | |
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"}' | |
with: | |
configurationFile: ${{ env.RENOVATE_CONFIG_FILE }} | |
token: "x-access-token:${{ steps.generate-token.outputs.token }}" | |
mount-docker-socket: "true" |