Skip to content

👷 Renovate

👷 Renovate #39

Workflow file for this run

name: 👷 Renovate
on:
workflow_dispatch:
schedule:
- cron: '40 9 * * 1' # Mondays at 09:40
env:
CACHE_ARCHIVE: renovate_cache.tar.gz
CACHE_DIR: /tmp/renovate/cache/renovate/repository
CACHE_KEY: renovate-cache
jobs:
renovate:
runs-on: 'ubuntu-latest'
steps:
- name: Get token
id: get_token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
private-key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }}
app-id: ${{ secrets.RENOVATE_APP_ID }} # deprecated in v3.1.0, migrate to client-id
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# This third party action allows you to download the cache artifact from different workflow runs
# Note that actions/cache doesn't work well because the cache key would need to be computed from
# a file within the cache, meaning there would never be any data to restore. actions/download-artifact
# also doesn't work because it only handles artifacts uploaded in the same run, and we want to restore
# from the previous successful run.
- uses: dawidd6/action-download-artifact@d63b86af1b34672e53c440b1b83979861906bad7 # v24
continue-on-error: true
with:
name: ${{ env.CACHE_KEY }}
path: cache-download
- name: Extract renovate cache
run: |
set -eux pipefail
if [ ! -d cache-download ] ; then
echo "No cache found."
exit 0
fi
mkdir -p $CACHE_DIR
tar -xzf cache-download/$CACHE_ARCHIVE -C $CACHE_DIR
sudo chown -R 12021:0 /tmp/renovate/
ls -R $CACHE_DIR
- name: Self-hosted Renovate
uses: renovatebot/github-action@c314dda4a9a93b08239ec978f2043b9a433b9ac4 # v46.3.0
with:
configurationFile: .github/renovate.json5
token: ${{ steps.get_token.outputs.token }}
env:
LOG_LEVEL: 'info'
RENOVATE_REPOSITORIES: ${{ github.repository }}
RENOVATE_REPOSITORY_CACHE: 'enabled'
RENOVATE_PLATFORM_COMMIT: 'enabled'
- name: Compress renovate cache
run: |
ls $CACHE_DIR
tar -czvf $CACHE_ARCHIVE -C $CACHE_DIR .
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.CACHE_KEY }}
path: ${{ env.CACHE_ARCHIVE }}
retention-days: 7