59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
# action.yml
|
|
name: renovate
|
|
description: 'renovate with caching'
|
|
|
|
inputs:
|
|
endpoint:
|
|
description: 'Renovate Endpoint'
|
|
required: true
|
|
token:
|
|
description: 'Renovate Token'
|
|
required: true
|
|
github-token:
|
|
description: 'GitHub Token'
|
|
required: true
|
|
args:
|
|
description: 'Renovate Args'
|
|
required: false
|
|
default: ''
|
|
save-cache:
|
|
description: 'Save cache'
|
|
required: false
|
|
default: 'false'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- uses: actions/cache/restore@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
|
|
with:
|
|
path: |
|
|
.tmp/cache/renovate/repository
|
|
key: repo-cache-${{ inputs.endpoint }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
repo-cache-${{ inputs.endpoint }}-
|
|
|
|
- run: |
|
|
renovate ${{ inputs.args }}
|
|
shell: bash
|
|
env:
|
|
GITHUB_COM_TOKEN: ${{ inputs.github-token }}
|
|
LOG_LEVEL: debug
|
|
RENOVATE_BASE_DIR: ${{ github.workspace }}/.tmp
|
|
RENOVATE_ENDPOINT: ${{ inputs.endpoint }}
|
|
RENOVATE_PLATFORM: gitea
|
|
RENOVATE_REPOSITORY_CACHE: 'enabled'
|
|
RENOVATE_TOKEN: ${{ inputs.token }}
|
|
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'
|
|
|
|
- name: Save renovate repo cache
|
|
if: always() && inputs.save-cache == 'true'
|
|
uses: actions/cache/save@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
|
|
with:
|
|
path: |
|
|
.tmp/cache/renovate/repository
|
|
key: repo-cache-${{ inputs.endpoint }}-${{ github.run_id }}
|