Skip to content

Update dependencies #56

Update dependencies

Update dependencies #56

# Self-hosted dependency updates.
#
# Add the following environment variables to the GitHub actions project:
# - RENOVATE_TOKEN: GitHub access token.
# - RENOVATE_GIT_AUTHOR: Author for Renovate commits as `Name <email@example.com>`.
# Variables provided below can be overridden in the GitHub project settings.
#
# This workflow can be run manually to initiate immediate updates, bypassing
# configured schedules, PR hourly limits and branch concurrent limits.
# An additional flag can be set to preserve the configured schedules and skip
# updates if they are not due. This allows to replicate automated scheduled runs.
name: Update dependencies
on:
schedule:
- cron: '45 11,23 * * *'
workflow_dispatch:
inputs:
preserve_schedules:
description: 'Use defined schedules and skip updates if they are not due.'
required: false
default: false
type: boolean
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Check requirements
id: check-requirements
run: |
if [ -z "${{ secrets.RENOVATE_TOKEN }}" ]; then
echo "Renovate token is not set. Skipping job."
exit 0
fi
if [ -z "${{ vars.RENOVATE_GIT_AUTHOR }}" ]; then
echo "Renovate git author is not set. Skipping job."
exit 0
fi
echo "should_run=true" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22.17.1
- name: Validate Renovate configuration
uses: suzuki-shunsuke/github-action-renovate-config-validator@ee9f69e1f683ed0d08225086482b34fc9abe9300 # v2.1.0
- name: Run Renovate
if: steps.check-requirements.outputs.should_run == 'true'
uses: renovatebot/github-action@68a3ea99af6ad249940b5a9fdf44fc6d7f14378b # v46.1.6
with:
configurationFile: renovate.json
token: ${{ secrets.RENOVATE_TOKEN }}
env:
RENOVATE_PLATFORM: 'github'
RENOVATE_AUTODISCOVER: false
RENOVATE_REPOSITORIES: ${{ vars.RENOVATE_REPOSITORIES || github.repository }}
RENOVATE_DEPENDENCY_DASHBOARD_TITLE: 'Renovate Dependency Dashboard (self-hosted) by GitHub Actions'
RENOVATE_DEPENDENCY_DASHBOARD: ${{ vars.RENOVATE_DEPENDENCY_DASHBOARD || 'false' }}
RENOVATE_DRY_RUN: ${{ vars.RENOVATE_DRY_RUN || 'false' }}
RENOVATE_GIT_AUTHOR: ${{ vars.RENOVATE_GIT_AUTHOR }}
RENOVATE_FORCE: ${{ github.event_name == 'workflow_dispatch' && inputs.preserve_schedules == false && '{"schedule":[],"prHourlyLimit":0,"branchConcurrentLimit":0}' || '' }}
LOG_LEVEL: 'debug'