renovate-config/.forgejo/workflows/renovate.yaml
2025-01-05 03:53:31 +00:00

49 lines
2 KiB
YAML

on:
schedule:
- cron: '*/30 * * * *'
push:
workflow_dispatch:
inputs:
args:
description: 'Optional renovate args, they replace the defaults and disable autodiscover'
required: false
type: string
env:
RENOVATE_DRY_RUN: ${{ ((github.event_name != 'schedule' && github.event_name != 'workflow_dispatch') || github.ref_name != 'main') && 'full' || '' }}
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.GPG }}
jobs:
renovate:
name: Renovate
runs-on: docker-x86_64
container:
image: git.hsn.dev/jahanson/renovate/renovate:39.90.4@sha256:1bda4ea08901a9b93f92a31a59eca414d2b947315ba77e2eff75d925eef9229e
options: --tmpfs /tmp:exec
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
show-progress: false
- name: Renovate
run: |
renovate ${{ env.INPUT_ARGS }}
env:
GITHUB_COM_TOKEN: ${{ secrets.GH_TOKEN }}
LOG_LEVEL: debug
RENOVATE_ENDPOINT: ${{ github.server_url }}
RENOVATE_PLATFORM: gitea
RENOVATE_TOKEN: ${{ github.repository == 'jahanson/renovate-config' && secrets.TOKEN || secrets.GITHUB_TOKEN }}
RENOVATE_GIT_AUTHOR: 'Renovate Bot <smeagol@hsn.dev>'
RENOVATE_HOST_RULES: |-
[
{"matchHost":"docker.io","hostType":"docker","username":"${{ secrets.DOCKER_USERNAME }}","password":"${{ secrets.DOCKER_PASSWORD }}"},
{"matchHost":"ghcr.io","hostType":"docker","username":"${{ sec.github-username }}","password":"${{ inputs.github-token }}"},
{"matchHost":"git.hsn.dev","username":"${{ secrets.DOCKER_USERNAME }}", "token":"${{ secrets.MIRROR_TOKEN }}"}
]
GIT_AUTHOR_NAME: 'Renovate Bot'
GIT_AUTHOR_EMAIL: 'smeagol@hsn.dev'
GIT_COMMITTER_NAME: 'Renovate Bot'
GIT_COMMITTER_EMAIL: 'smeagol@hsn.dev'
INPUT_ARGS: ${{ inputs.args || (github.repository != 'jahanson/renovate-config' && github.repository) || '--autodiscover' }}