From 71fe38d581c920860e7055eb6196c1d10cea6fda Mon Sep 17 00:00:00 2001 From: continuist Date: Sun, 29 Jun 2025 15:25:37 -0400 Subject: [PATCH] Update version of Forgejo Runner --- CI_CD_PIPELINE_SETUP_GUIDE.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/CI_CD_PIPELINE_SETUP_GUIDE.md b/CI_CD_PIPELINE_SETUP_GUIDE.md index 69a576d..ab8538f 100644 --- a/CI_CD_PIPELINE_SETUP_GUIDE.md +++ b/CI_CD_PIPELINE_SETUP_GUIDE.md @@ -869,11 +869,36 @@ chmod 600 ~/.ssh/config ```bash cd ~ -wget https://code.forgejo.org/forgejo/runner/releases/download/v0.2.11/forgejo-runner-0.2.11-linux-amd64 -chmod +x forgejo-runner-0.2.11-linux-amd64 -sudo mv forgejo-runner-0.2.11-linux-amd64 /usr/local/bin/forgejo-runner + +# Get the latest version dynamically +LATEST_VERSION=$(curl -s https://code.forgejo.org/api/v1/repos/forgejo/runner/releases | jq -r '.[0].tag_name') +echo "Downloading Forgejo runner version: $LATEST_VERSION" + +# Download the latest runner +wget https://code.forgejo.org/forgejo/runner/releases/download/${LATEST_VERSION}/forgejo-runner-${LATEST_VERSION#v}-linux-amd64 +chmod +x forgejo-runner-${LATEST_VERSION#v}-linux-amd64 +sudo mv forgejo-runner-${LATEST_VERSION#v}-linux-amd64 /usr/local/bin/forgejo-runner ``` +**Alternative: Pin to Specific Version (Recommended for Production)** + +If you prefer to pin to a specific version for stability, replace the dynamic download with: + +```bash +cd ~ +VERSION="v6.3.1" # Pin to specific version +wget https://code.forgejo.org/forgejo/runner/releases/download/${VERSION}/forgejo-runner-${VERSION#v}-linux-amd64 +chmod +x forgejo-runner-${VERSION#v}-linux-amd64 +sudo mv forgejo-runner-${VERSION#v}-linux-amd64 /usr/local/bin/forgejo-runner +``` + +**What this does**: +- **Dynamic approach**: Downloads the latest stable Forgejo Actions runner +- **Version pinning**: Allows you to specify a known-good version for production +- **Makes the binary executable** and installs it system-wide for use by the SERVICE_USER + +**Production Recommendation**: Use version pinning in production environments to ensure consistency and avoid unexpected breaking changes. + #### 7.2 Create Systemd Service ```bash