2025-01-06 10:03:34 +00:00
|
|
|
#
|
|
|
|
# Runs every 2 hours, but Renovate is limited to create new PR before 4am.
|
|
|
|
# See renovate.json for more settings.
|
|
|
|
# Automerge is enabled for Renovate PR's but need to be approved before.
|
|
|
|
#
|
|
|
|
name: renovate
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- renovate/** # self-test updates
|
|
|
|
paths:
|
|
|
|
- .forgejo/workflows/renovate.yml
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0/2 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
RENOVATE_DRY_RUN: ${{ (github.event_name != 'schedule' && github.ref_name != github.event.repository.default_branch) && 'full' || '' }}
|
2025-01-08 18:10:44 +00:00
|
|
|
RENOVATE_PRINT_CONFIG: 'true'
|
2025-01-06 10:03:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
renovate:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
2025-01-10 12:04:26 +00:00
|
|
|
image: renovate/renovate:39.101.0@sha256:d27eef3872396ee5834ce0b76a7124f63ab4397b8886ded353871f00a01aa3d8
|
2025-01-06 10:03:34 +00:00
|
|
|
|
|
|
|
steps:
|
2025-01-08 10:43:46 +00:00
|
|
|
- name: "Import Secrets"
|
|
|
|
id: "import-secrets"
|
2025-01-09 20:01:08 +00:00
|
|
|
uses: "https://github.com/hashicorp/vault-action@a1b77a09293a4366e48a5067a86692ac6e94fdc0" # v3
|
2025-01-08 10:43:46 +00:00
|
|
|
with:
|
|
|
|
url: "https://vault.w9r.dev"
|
|
|
|
method: "approle"
|
|
|
|
role: "forgejo-ci"
|
2025-01-08 10:44:39 +00:00
|
|
|
roleId: "${{ secrets.VAULT_ROLE_ID }}"
|
|
|
|
secretId: "${{ secrets.VAULT_SECRET_ID }}"
|
2025-01-08 10:43:46 +00:00
|
|
|
secrets: |
|
|
|
|
kv/data/ci/nexus username | MAVEN_USERNAME ;
|
|
|
|
kv/data/ci/nexus password | MAVEN_CENTRAL_TOKEN ;
|
2025-01-08 11:10:27 +00:00
|
|
|
kv/data/ci/renovatebot gpgPrivateKey | RENOVATE_GPG_PRIVATE_KEY ;
|
|
|
|
kv/data/ci/renovatebot gpgPublicKey | RENOVATE_GPG_PUBLIC_KEY ;
|
|
|
|
kv/data/ci/renovatebot gpgPassphrase | RENOVATE_GPG_PASSPHRASE ;
|
2025-01-08 10:43:46 +00:00
|
|
|
kv/data/ci/renovatebot ciToken | RENOVATE_TOKEN ;
|
2025-01-08 11:25:55 +00:00
|
|
|
kv/data/ci/renovatebot githubToken | GITHUB_COM_TOKEN ;
|
2025-01-08 14:28:17 +00:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
with:
|
|
|
|
token: "${{ env.RENOVATE_TOKEN }}"
|
|
|
|
|
2025-01-06 10:03:34 +00:00
|
|
|
- name: Load renovate repo cache
|
2025-01-08 11:51:04 +00:00
|
|
|
uses: https://github.com/actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
|
2025-01-06 10:03:34 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.tmp/cache/renovate/repository
|
|
|
|
.tmp/cache/renovate/renovate-cache-sqlite
|
|
|
|
.tmp/osv
|
|
|
|
key: repo-cache-${{ github.run_id }}
|
|
|
|
restore-keys: |
|
|
|
|
repo-cache-
|
2025-01-08 11:11:19 +00:00
|
|
|
- name: "Import Commit Signing GPG key"
|
|
|
|
id: "import-gpg"
|
2025-01-08 11:51:04 +00:00
|
|
|
uses: "https://github.com/crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5" # v6
|
2025-01-08 11:11:19 +00:00
|
|
|
with:
|
2025-01-08 11:14:14 +00:00
|
|
|
gpg_private_key: "${{ env.RENOVATE_GPG_PRIVATE_KEY }}"
|
2025-01-08 11:11:19 +00:00
|
|
|
passphrase: "${{ env.RENOVATE_GPG_PASSPHRASE }}"
|
|
|
|
git_user_signingkey: true
|
|
|
|
git_commit_gpgsign: true
|
2025-01-08 11:10:27 +00:00
|
|
|
|
2025-01-08 11:11:19 +00:00
|
|
|
- name: "GPG user IDs"
|
|
|
|
shell: "bash"
|
|
|
|
run: |
|
|
|
|
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
|
|
|
|
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
|
|
|
|
echo "name: ${{ steps.import-gpg.outputs.name }}"
|
|
|
|
echo "email: ${{ steps.import-gpg.outputs.email }}"
|
2025-01-06 10:03:34 +00:00
|
|
|
|
|
|
|
- name: Run renovate
|
|
|
|
run: renovate
|
|
|
|
env:
|
|
|
|
LOG_LEVEL: debug
|
|
|
|
RENOVATE_BASE_DIR: ${{ github.workspace }}/.tmp
|
2025-01-08 10:53:42 +00:00
|
|
|
RENOVATE_CONFIG_FILE: ${{ github.workspace }}/config.js
|
2025-01-06 10:03:34 +00:00
|
|
|
RENOVATE_REPOSITORY_CACHE: 'enabled'
|
|
|
|
RENOVATE_GIT_AUTHOR: 'RenovateBot <renovatebot@w9r.dev>'
|
|
|
|
RENOVATE_X_SQLITE_PACKAGE_CACHE: true
|
|
|
|
GIT_AUTHOR_NAME: 'RenovateBot'
|
|
|
|
GIT_AUTHOR_EMAIL: 'renovatebot@w9r.dev'
|
|
|
|
GIT_COMMITTER_NAME: 'RenovateBot'
|
|
|
|
GIT_COMMITTER_EMAIL: 'renovatebot@w9r.dev'
|
|
|
|
OSV_OFFLINE_ROOT_DIR: ${{ github.workspace }}/.tmp/osv
|
|
|
|
|
|
|
|
- name: Save renovate repo cache
|
|
|
|
if: always() && env.RENOVATE_DRY_RUN != 'full'
|
2025-01-08 11:51:04 +00:00
|
|
|
uses: https://github.com/actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
|
2025-01-06 10:03:34 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.tmp/cache/renovate/repository
|
|
|
|
.tmp/cache/renovate/renovate-cache-sqlite
|
|
|
|
.tmp/osv
|
|
|
|
key: repo-cache-${{ github.run_id }}
|