Renovate #10190
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: Renovate | |
on: | |
repository_dispatch: | |
types: [renovate] | |
schedule: | |
# Run every 30 minutes: | |
- cron: "0,30 * * * *" | |
permissions: {} | |
env: | |
cache_dir: /tmp/renovate/cache | |
cache_key: renovate-cache | |
config_file: config.yaml | |
# tool versions | |
# renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate | |
RENOVATE_VERSION: 39.79.1 | |
jobs: | |
renovate: | |
name: Renovate | |
concurrency: | |
group: ${{ github.workflow }} | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
contents: read | |
steps: | |
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
id: restore-cache | |
if: github.event.client_payload.repoCache != 'disabled' | |
with: | |
key: ${{ env.cache_key }} | |
path: ${{ env.cache_dir }} | |
- run: sudo chown -R 12021:0 /tmp/renovate/ | |
continue-on-error: true | |
- name: Generate a token | |
id: generate_token | |
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 | |
with: | |
# [permissions]───────────────────────────────────────────────────────────────── | |
# [read-only] | |
# repo: Administration, Dependabot alerts, Metadata, Packages | |
# org: Members | |
# [read and write] | |
# repo: Checks, Commit statuses, Contents, Issues, Pull requests, Workflows | |
# ────────────────────────────────────────────────────────────────────────────── | |
app-id: ${{ vars.MAZI_RENOVATE_APP_ID }} | |
private-key: ${{ secrets.MAZI_RENOVATE_PRIVATE_KEY }} | |
owner: ${{ github.repository_owner }} | |
- name: "Checkout ${{ env.config_file }}" | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
sparse-checkout: | | |
${{ env.config_file }} | |
sparse-checkout-cone-mode: false | |
- uses: renovatebot/github-action@e3a862510f27d57a380efb11f0b52ad7e8dbf213 # v41.0.6 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
renovate-version: ${{ env.RENOVATE_VERSION }} | |
env-regex: "^(?:RENOVATE_\\w+|FORCE_COLOR|LOG_LEVEL)$" | |
env: | |
# This enables the cache -- if this is set, it's not necessary to add it to renovate.json. | |
RENOVATE_REPOSITORY_CACHE: ${{ github.event.client_payload.repoCache || 'enabled' }} | |
RENOVATE_AUTODISCOVER: true # Renovate runs NOT only on this repository. | |
RENOVATE_DEPENDENCY_DASHBOARD_FOOTER: "- [ ] <!-- manual job -->Check this box to trigger a request for Renovate to run again on this repository" | |
RENOVATE_PLATFORM_COMMIT: true | |
FORCE_COLOR: 3 # chalk.supportsColor | |
LOG_LEVEL: debug | |
# customize | |
RENOVATE_CONFIG_FILE: ${{ env.config_file }} | |
RENOVATE_PR_FOOTER: "This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate/tree/${{ env.RENOVATE_VERSION }}). - [View logs](${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }})" | |
- run: tree -L 5 -h --du -F -- "${cache_dir}" | |
- name: delete old cache | |
if: github.event.client_payload.repoCache != 'disabled' && github.ref_name == github.event.repository.default_branch | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_REPO: ${{ github.repository }} | |
run: gh cache delete ${{ steps.restore-cache.outputs.cache-primary-key }} | |
continue-on-error: true | |
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
if: github.event.client_payload.repoCache != 'disabled' && github.ref_name == github.event.repository.default_branch | |
with: | |
key: ${{ steps.restore-cache.outputs.cache-primary-key }} | |
path: ${{ env.cache_dir }} |