ci: add Control Center bootstrap script and RenovateBot workflow
This commit is contained in:
parent
dd2065cf60
commit
960f8f63fe
2 changed files with 60 additions and 0 deletions
25
.forgejo/workflows/renovate.yml
Normal file
25
.forgejo/workflows/renovate.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: RenovateBot
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run at 2:00 AM every day
|
||||||
|
- cron: '0 2 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
renovate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Self-hosted Renovate
|
||||||
|
uses: renovatebot/github-action@v40.1.11
|
||||||
|
env:
|
||||||
|
# Token needs permission to read/write repository contents and pull requests
|
||||||
|
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
# The platform needs to be explicitly defined for Forgejo/Gitea
|
||||||
|
RENOVATE_PLATFORM: "gitea"
|
||||||
|
RENOVATE_ENDPOINT: "https://your-forgejo-instance.local/api/v1"
|
||||||
|
# The repository format: owner/repo
|
||||||
|
RENOVATE_REPOSITORIES: "your-username/nix-config"
|
||||||
35
scripts/control-center-bootstrap.sh
Executable file
35
scripts/control-center-bootstrap.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
echo "=========================================="
|
||||||
|
echo " Bootstrapping Control Center VM "
|
||||||
|
echo "=========================================="
|
||||||
|
|
||||||
|
# Ensure script is run with appropriate permissions (this script might run as part of Cloud-Init or manually)
|
||||||
|
|
||||||
|
if ! command -v terraform &> /dev/null; then
|
||||||
|
echo "Terraform not found. Please ensure it is installed via Nix."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "1. Initializing proxmox-bootstrap state..."
|
||||||
|
cd terraform/proxmox-bootstrap
|
||||||
|
terraform init
|
||||||
|
|
||||||
|
echo "2. Applying proxmox-bootstrap (Requires manual approval if not passing -auto-approve)"
|
||||||
|
echo " This will configure the restricted terraform@pve user on the Proxmox host."
|
||||||
|
# Uncomment the following line to auto-approve in a fully automated environment
|
||||||
|
# terraform apply -auto-approve
|
||||||
|
terraform apply
|
||||||
|
|
||||||
|
echo "3. Fetching the generated API token..."
|
||||||
|
TF_TOKEN=$(terraform output -raw terraform_api_token)
|
||||||
|
|
||||||
|
echo "=========================================="
|
||||||
|
echo " IMPORTANT: Save the following token into "
|
||||||
|
echo " Forgejo Secrets as PROXMOX_TOKEN_SECRET "
|
||||||
|
echo "=========================================="
|
||||||
|
echo "$TF_TOKEN"
|
||||||
|
echo "=========================================="
|
||||||
|
|
||||||
|
echo "Control Center Bootstrap Complete."
|
||||||
Loading…
Add table
Add a link
Reference in a new issue