From 826a854933a41d420994786b9d70693c1e72dc2d Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 15 May 2024 07:12:35 -0500 Subject: [PATCH] Add renovate action and correct image --- .forgejo/actions/renovate/action.yaml | 59 +++++++++++++++++++++++++++ .forgejo/workflows/renovate.yaml | 7 +++- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 .forgejo/actions/renovate/action.yaml diff --git a/.forgejo/actions/renovate/action.yaml b/.forgejo/actions/renovate/action.yaml new file mode 100644 index 0000000..6cab068 --- /dev/null +++ b/.forgejo/actions/renovate/action.yaml @@ -0,0 +1,59 @@ +# 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@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + 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 ' + + GIT_AUTHOR_NAME: 'Renovate Bot' + GIT_AUTHOR_EMAIL: 'bot@kriese.eu' + GIT_COMMITTER_NAME: 'Renovate Bot' + GIT_COMMITTER_EMAIL: 'bot@kriese.eu' + + - name: Save renovate repo cache + if: always() && inputs.save-cache == 'true' + uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + with: + path: | + .tmp/cache/renovate/repository + key: repo-cache-${{ inputs.endpoint }}-${{ github.run_id }} diff --git a/.forgejo/workflows/renovate.yaml b/.forgejo/workflows/renovate.yaml index a37d473..1b7df1f 100644 --- a/.forgejo/workflows/renovate.yaml +++ b/.forgejo/workflows/renovate.yaml @@ -1,10 +1,13 @@ -on: [push] +on: + push: + schedule: + - cron: '*/30 * * * *' jobs: renovate: name: Renovate runs-on: ubuntu-latest container: - image: ghcr.io/visualon/renovate:37.363.4@sha256:8c6e868c1ff7190f243d20dbeef44c86fc9b1dcdf344c4ece45facdfe3416cb7 + image: ghcr.io/renovatebot/renovate:37.363.8@sha256:d5d20fda77bffb65bb4099389d6cb064e1e06b085bc547e10330bf82317c9693 steps: - name: Checkout uses: actions/checkout@v3