Files
plex-playlist/.gitea/workflows/renovate.yml
Cliff Hill 4454e9aef5
Some checks failed
Tests / Build and Push CICD Base Image (push) Successful in 1m7s
Tests / Build and Push CICD Complete Image (push) Successful in 34m29s
Tests / YAML Syntax Check (push) Successful in 46s
Tests / Mixed Line Ending Check (push) Successful in 35s
Tests / TOML Formatting Check (push) Successful in 42s
Tests / Ruff Linting (push) Successful in 36s
Tests / Ruff Format Check (push) Successful in 36s
Tests / Pyright Type Check (push) Successful in 1m2s
Tests / Darglint Docstring Check (push) Successful in 48s
Tests / No Docstring Types Check (push) Successful in 31s
Tests / ESLint Check (push) Successful in 1m1s
Tests / Prettier Format Check (push) Successful in 44s
Tests / TypeScript Type Check (push) Successful in 1m18s
Tests / TSDoc Lint Check (push) Successful in 1m3s
Tests / Backend Tests (push) Successful in 49s
Tests / Frontend Tests (push) Successful in 1m39s
Tests / Backend Doctests (push) Successful in 35s
Tests / End-to-End Tests (push) Successful in 7m58s
Tests / Trailing Whitespace Check (push) Successful in 30m11s
Tests / Integration Tests (push) Failing after 22m6s
Tests / TOML Syntax Check (push) Failing after 38m33s
Tests / End of File Check (push) Successful in 41m46s
Adding renovate stuff.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
2025-11-04 12:40:53 -05:00

159 lines
5.2 KiB
YAML

name: Renovate Dependency Updates
on:
schedule:
# Run Renovate every Monday at 8 AM UTC
- cron: '0 8 * * 1'
workflow_dispatch: # Allow manual triggering
inputs:
dry_run:
description: 'Run in dry-run mode (no changes made)'
required: false
default: 'false'
type: boolean
jobs:
renovate:
name: Renovate Dependencies
runs-on: ubuntu-act
steps:
- name: Checkout repository
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "=== Repository Checkout for Renovate ==="
# Set up SSH key securely
if [ -n "${SSH_PRIVATE_KEY}" ]; then
mkdir -p ~/.ssh
echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p 2222 dogar.darkhelm.org >> ~/.ssh/known_hosts 2>/dev/null
fi
# Clone repository
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" \
git clone --depth 1 \
ssh://git@dogar.darkhelm.org:2222/DarkHelm.org/plex-playlist.git .
# Clean up SSH key
rm -f ~/.ssh/id_rsa
echo "✓ Repository checked out for Renovate processing"
- name: Setup Node.js for Renovate
run: |
# Install Node.js 24 (required for Renovate 41+)
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
# Update npm to latest version
npm install -g npm@latest
# Verify installation
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
# Check if versions meet Renovate requirements
NODE_VERSION=$(node --version | cut -d'v' -f2)
if [[ $(echo "$NODE_VERSION 24.10.0" | awk '{print ($1 >= $2)}') == 1 ]]; then
echo "✓ Node.js version $NODE_VERSION meets Renovate requirements"
else
echo "⚠️ Node.js version $NODE_VERSION may not fully support latest Renovate"
fi
- name: Install Renovate
run: |
echo "Installing compatible Renovate version..."
# Use a specific version that works with Node 24.6+
npm install -g renovate@40.3.2
renovate --version
- name: Configure Renovate for Gitea
env:
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
run: |
echo "=== Configuring Renovate for Gitea ==="
# Create Renovate configuration file
cat > renovate-config.js << 'EOF'
module.exports = {
platform: 'gitea',
endpoint: 'https://dogar.darkhelm.org/api/v1',
token: process.env.RENOVATE_TOKEN,
gitAuthor: 'Renovate Bot <renovate@darkhelm.org>',
repositories: ['DarkHelm.org/plex-playlist'],
onboarding: false,
requireConfig: 'required',
// Use existing renovate.json configuration
extends: ['local>DarkHelm.org/plex-playlist'],
// CI-specific settings
prConcurrentLimit: 3,
branchConcurrentLimit: 5,
// Logging
logLevel: 'info',
logFile: '/tmp/renovate.log',
// Dry run mode for testing
dryRun: process.env.RENOVATE_DRY_RUN === 'true'
};
EOF
echo "✓ Renovate configuration created"
- name: Run Renovate
env:
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_DRY_RUN: ${{ inputs.dry_run }}
LOG_LEVEL: info
run: |
echo "=== Running Renovate Bot ==="
# Verify token is available
if [ -z "${RENOVATE_TOKEN}" ]; then
echo "❌ RENOVATE_TOKEN secret not configured"
echo "Please add a Gitea API token to repository secrets"
exit 1
fi
# Run Renovate with configuration
if [ "${RENOVATE_DRY_RUN}" = "true" ]; then
echo "🔍 Running in DRY-RUN mode (no changes will be made)"
fi
renovate --config-file=renovate-config.js DarkHelm.org/plex-playlist
echo "✓ Renovate execution completed"
- name: Upload Renovate logs
if: always()
run: |
if [ -f "/tmp/renovate.log" ]; then
echo "=== Renovate Log Output ==="
echo "Last 50 lines of Renovate log:"
tail -50 /tmp/renovate.log
# Save log as artifact (if GitHub Actions artifact support exists)
mkdir -p /tmp/artifacts
cp /tmp/renovate.log /tmp/artifacts/renovate-$(date +%Y%m%d-%H%M%S).log
else
echo "No Renovate log file found"
fi
- name: Report Results
if: always()
run: |
echo "=== Renovate Execution Summary ==="
echo "Repository: DarkHelm.org/plex-playlist"
echo "Execution time: $(date)"
echo "Dry run mode: ${RENOVATE_DRY_RUN:-false}"
echo ""
echo "Check the Dependency Dashboard issue in your repository for detailed results:"
echo "https://dogar.darkhelm.org/DarkHelm.org/plex-playlist/issues"
echo ""
echo "Next scheduled run: Next Monday at 8 AM UTC"