Skip to content

Renovate Schedule

Renovate Schedule #42

# trunk-ignore-all(checkov/CKV2_GHA_1)
---
name: Renovate Schedule
on:
workflow_dispatch:
inputs:
# trunk-ignore(checkov/CKV_GHA_7)
dryRun:
description: Dry Run
default: "false"
required: false
logLevel:
description: Log Level
default: debug
required: false
schedule:
- cron: 47 2 * * *
push:
branches: [main]
paths:
- .github/renovate.json5
- .github/renovate/**.json5
# Retrieve BOT_USER_ID via `curl -s "https://api.github.com/users/${BOT_USERNAME}%5Bbot%5D" | jq .id`
env:
DRY_RUN: false
LOG_LEVEL: debug
RENOVATE_PLATFORM_COMMIT: true
RENOVATE_CONFIG_FILE: .github/renovate.json5
RENOVATE_REPOSITORIES: ${{ github.repository }}
RENOVATE_DETECT_HOST_RULES_FROM_ENV: true
RENOVATE_USERNAME: cosmos-renovate-bot[bot]
RENOVATE_GIT_AUTHOR: "cosmos-renovate-bot[bot] <${{ secrets.USER_ID }}+cosmos-renovate-bot[bot]@users.noreply.github.com>"
jobs:
renovate:
name: Renovate
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: "${{ secrets.APP_ID }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: "${{ steps.app-token.outputs.token }}"
- name: Override default config from dispatch variables
shell: bash
run: |
echo "RENOVATE_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@0984fb80fc633b17e57f3e8b6c007fe0dc3e0d62 # v40.3.6
with:
configurationFile: "${{ env.RENOVATE_CONFIG_FILE }}"
token: "${{ steps.app-token.outputs.token }}"