Renovate tweaks.
This commit is contained in:
@@ -1,24 +1,73 @@
|
|||||||
name: Renovate
|
# .gitea/workflows/renovate.yml
|
||||||
|
name: Run Renovate
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0/30 * * * *"
|
- cron: "0 2 * * *" # daily at 2 AM
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
renovate:
|
renovate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
# 1️⃣ Checkout rinoa-docker repository
|
||||||
|
- name: Checkout rinoa-docker
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Renovate
|
# 2️⃣ Checkout your forked renovatebot action into a subdir
|
||||||
uses: https://git.trez.wtf/Trez.One/renovate-github-action@gitea-compatible
|
- name: Checkout renovate-github-action fork
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
configurationFile: ./renovate.json
|
repository: "Trez.One/renovate-github-action"
|
||||||
docker-volumes-from: ${{ env.JOB_CONTAINER_NAME }}
|
ref: gitea-compatible
|
||||||
renovate-version: 41.97.7-full
|
path: renovate-action
|
||||||
token: ${{ secrets.RENOVATE_BOT_TOKEN }}
|
|
||||||
|
# 3️⃣ Setup Node.js (mirroring action.yml)
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
cache: "pnpm"
|
||||||
|
|
||||||
|
# 4️⃣ Install pnpm dependencies
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
working-directory: renovate-action
|
||||||
|
|
||||||
|
# 5️⃣ Build TypeScript
|
||||||
|
- name: Build renovate action
|
||||||
|
run: pnpm build
|
||||||
|
working-directory: renovate-action
|
||||||
|
|
||||||
|
# 6️⃣ Run Renovate with retry handling
|
||||||
|
- name: Run Renovate
|
||||||
|
working-directory: renovate-action
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
max_attempts=3
|
||||||
|
attempt=1
|
||||||
|
|
||||||
|
until [ $attempt -gt $max_attempts ]; do
|
||||||
|
echo "Running Renovate (attempt $attempt/$max_attempts)..."
|
||||||
|
if node dist/index.js; then
|
||||||
|
echo "Renovate completed successfully."
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Renovate failed on attempt $attempt."
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
if [ $attempt -le $max_attempts ]; then
|
||||||
|
echo "Retrying in 10 seconds..."
|
||||||
|
sleep 10
|
||||||
|
else
|
||||||
|
echo "All $max_attempts attempts failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
env:
|
env:
|
||||||
LOG_LEVEL: debug
|
LOG_LEVEL: debug
|
||||||
|
RENOVATE_TOKEN: ${{ secrets.RENOVATE_BOT_TOKEN }}
|
||||||
|
with:
|
||||||
|
configurationFile: ../renovate.json
|
||||||
|
docker-volumes-from: ${{ env.JOB_CONTAINER_NAME }}
|
||||||
|
|||||||
Reference in New Issue
Block a user