renovate-config/.forgejo/workflows/renovate.yaml

85 lines
2.9 KiB
YAML
Raw Normal View History

2024-05-15 08:59:54 -05:00
on:
schedule:
- cron: '*/30 * * * *'
2024-07-26 20:53:52 -05:00
push:
workflow_dispatch:
inputs:
2025-01-02 05:23:07 -06:00
args:
description: 'Optional renovate args, they replace the defaults and disable autodiscover'
required: false
2025-01-02 05:23:07 -06:00
type: string
env:
2025-01-02 05:23:07 -06:00
RENOVATE_DRY_RUN: ${{ ((github.event_name != 'schedule' && github.event_name != 'workflow_dispatch') || github.ref_name != 'main') && 'full' || '' }}
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.GPG }}
2025-01-01 17:10:46 -06:00
2024-05-15 08:59:54 -05:00
jobs:
renovate:
name: Renovate
2025-01-12 11:44:54 -06:00
runs-on: native-x86_64
2024-05-15 08:59:54 -05:00
container:
2025-01-02 04:27:33 -06:00
image: git.hsn.dev/jahanson/renovate/renovate:39.87.0@sha256:3a17d23d6fb3ca2169b079bf2c970cb25567be639ba42bb2064750973b69b83c
2025-01-02 05:23:07 -06:00
options: --tmpfs /tmp:exec
2024-05-15 08:59:54 -05:00
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2024-05-15 08:59:54 -05:00
with:
show-progress: false
2025-01-02 05:23:07 -06:00
2025-01-12 11:32:43 -06:00
- name: Setup Docker auth
2025-01-02 05:23:07 -06:00
run: |
2025-01-12 11:32:43 -06:00
mkdir -p $HOME/.docker
echo '{"auths":{"docker.io":{"auth":"${{ secrets.DOCKER_AUTH }}"}}}' > $HOME/.docker/config.json
chmod 600 $HOME/.docker/config.json
- name: Renovate
2025-01-02 05:23:07 -06:00
env:
2025-01-12 11:32:43 -06:00
# Global config
RENOVATE_BINARY_SOURCE: "docker"
RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: ${{ github.server_url }}
RENOVATE_TOKEN: ${{ github.repository == 'jahanson/renovate-config' && secrets.TOKEN || secrets.GITHUB_TOKEN }}
# Git config
RENOVATE_GIT_AUTHOR: 'Renovate Bot <smeagol@hsn.dev>'
GIT_AUTHOR_NAME: 'Renovate Bot'
GIT_AUTHOR_EMAIL: 'smeagol@hsn.dev'
GIT_COMMITTER_NAME: 'Renovate Bot'
GIT_COMMITTER_EMAIL: 'smeagol@hsn.dev'
# Authentication
GITHUB_COM_TOKEN: ${{ secrets.GH_TOKEN }}
2025-01-07 16:33:38 -06:00
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
2025-01-12 11:32:43 -06:00
# Logging
2025-01-02 05:23:07 -06:00
LOG_LEVEL: debug
2025-01-07 16:33:38 -06:00
LOG_FORMAT: json
2025-01-12 11:32:43 -06:00
LOG_FILE_LEVEL: debug
# Host rules for registry authentication
2025-01-02 05:46:14 -06:00
RENOVATE_HOST_RULES: |-
[
2025-01-07 16:33:38 -06:00
{
2025-01-12 11:32:43 -06:00
"matchHost": "registry-1.docker.io",
"hostType": "docker",
2025-01-07 16:33:38 -06:00
"username": "${{ secrets.DOCKER_USERNAME }}",
"password": "${{ secrets.DOCKER_PASSWORD }}"
},
{
"matchHost": "ghcr.io",
2025-01-12 11:32:43 -06:00
"hostType": "docker",
2025-01-07 16:33:38 -06:00
"username": "${{ secrets.GH_USERNAME }}",
"password": "${{ secrets.GH_TOKEN }}"
},
{
"matchHost": "git.hsn.dev",
2025-01-12 11:32:43 -06:00
"hostType": "gitea",
2025-01-07 16:33:38 -06:00
"token": "${{ secrets.MIRROR_TOKEN }}"
}
2025-01-02 05:46:14 -06:00
]
2025-01-12 11:32:43 -06:00
# Command execution
2025-01-02 05:23:07 -06:00
INPUT_ARGS: ${{ inputs.args || (github.repository != 'jahanson/renovate-config' && github.repository) || '--autodiscover' }}
2025-01-12 11:32:43 -06:00
run: renovate ${{ env.INPUT_ARGS }}