3. Setting up sfops repository

Once you have forked the repository from sfops upstream (contact team for access) into a repository in your GitHub organisation, please set up the following variables and secrets.

Variables & Secrets

To use the associated workflows, you need to set the following repository secrets and variables:

GitHub Authentication

GitHub Personal Access Token

Variable
Type
Value Type
Example
Comments

GHA_TOKEN

Repository Secret

String

ghp_...

The GitHub PAT created in Prerequisites

GitHub App Credentials

These credentials are from the sfops-bot GitHub App:

Variable
Type
Value Type
Example
Comments

SFOPSBOT_APP_ID

Organization Variable

String

1768214

The App ID from your GitHub App settings page

SFOPSBOT_APP_PRIVATE_KEY

Organization Secret

String

-----BEGIN RSA...

The entire contents of the .pem file downloaded from your GitHub App

Docker Registry Configuration

Secrets for Pushing Docker Images

These secrets are required to push the built sfops Docker images to GitHub Container Registry (ghcr.io):

Variable
Type
Value Type
Example
Comments

DOCKER_PUSH_TOKEN

Repository Secret

String

ghp_...

GitHub PAT with write:packages permission (can reuse GHA_TOKEN)

Note: The sfops workflows currently only support pushing to GitHub Container Registry (ghcr.io). The workflow automatically uses your GitHub username for authentication.

Configuration for Pulling Base Images

These settings configure where to pull the sfp-pro base images that sfops Docker images are built upon.

Default Setup (Using official sfp-pro from Gitea)

Variable
Type
Value Type
Example
Comments

BASE_REGISTRY

Repository Variable

String

source.flxbl.io

Keep as source.flxbl.io for official images

BASE_REPO

Repository Variable

String

flxbl

Keep as flxbl for official images

BASE_REGISTRY_USERNAME

Repository Secret

String

your-username

Your Gitea username

BASE_REGISTRY_TOKEN

Repository Secret

String

gitea_token

Your Gitea token (same as created in Prerequisites)

If You've Forked sfp-pro

If you've built your own sfp-pro images (instructions), configure these variables to point to your registry.

Example for GitHub Container Registry:

Variable
Type
Value Type
Example
Comments

BASE_REGISTRY

Repository Variable

String

ghcr.io

GitHub Container Registry

BASE_REPO

Repository Variable

String

your-org

Your GitHub organization name

BASE_REGISTRY_USERNAME

Repository Secret

String

your-username

Your GitHub username

BASE_REGISTRY_TOKEN

Repository Secret

String

ghp_...

Your GitHub PAT with read:packages (can reuse GHA_TOKEN)

BASE_IMAGE_NAME

Repository Variable

String

your-sfp-pro

Your custom sfp-pro image name (defaults to sfp-pro)

BASE_LITE_IMAGE_NAME

Repository Variable

String

your-sfp-lite

Your custom sfp-pro-lite image name (defaults to sfp-pro-lite)

Important: If you have forked sfp-pro and are using custom image names, ensure you set both:

  • BASE_IMAGE_NAME: For the main sfops image (defaults to sfp-pro)

  • BASE_LITE_IMAGE_NAME: For the lite sfops image (defaults to sfp-pro-lite)

These variables are crucial for the workflows to correctly pull your custom base images.

Environment Configuration

You need to create environments in your sfops repository for each organization you want to deploy to. Each environment requires the same set of variables with different values.

Setting Up Environments

Navigate to your sfops repository → SettingsEnvironments (or directly: https://github.com/YOUR_ORG/sfops/settings/environments)

Required: Production Environment

Step 1: Create Production Environment

  1. Click "New environment" and name it (e.g., production or prod)

  2. Add these environment variables:

Variable
Example Value
Comments

REPO_OWNER

your-org

Your GitHub organization name

PROJECT_REPO

sf-core

Your production Salesforce repository

SFOPS_ACTION_REPO

sfops-gh-actions

Production actions repository

DASHBOARD_REPO

sfops-dev-central

Dev Central repository

SFP_SERVER_URL

https://codev.example.com

Codev Hub URL (use placeholder if not using Codev Hub yet)

SFOPS_IMAGE

ghcr.io/your-org/sfops:latest

Docker image with latest tag

SFOPS_LITE_IMAGE

ghcr.io/your-org/sfops-lite:latest

Lite Docker image with latest tag

Optional: Test Environment

Recommended: Create a test environment to validate changes before deploying to production. Skip this if you prefer to test directly in production. 🎲

Step 2: Create Test Environment (Optional)

  1. Click "New environment" and name it (e.g., test or dev)

  2. Add these environment variables:

Variable
Example Value
Comments

REPO_OWNER

your-org

Your GitHub organization name

PROJECT_REPO

sf-core-test

Your test Salesforce repository

SFOPS_ACTION_REPO

sfops-gh-actions-test

Test actions repository

DASHBOARD_REPO

sfops-dev-central-test

Test Dev Central repository

SFP_SERVER_URL

https://codev-test.example.com

Test Codev Hub URL (use placeholder if not using Codev Hub yet)

SFOPS_IMAGE

ghcr.io/your-org/sfops:development

Docker image with development tag

SFOPS_LITE_IMAGE

ghcr.io/your-org/sfops-lite:development

Lite Docker image with dev tag

Step 3: Configure Repository Variables

Go to Settings → Secrets and variablesActionsVariables tab and create:

  • ORGS: Array with all your environment names, e.g., ['production'] or ['production', 'test']

Important: The values in ORGS must exactly match the environment names you created above. Add all your environments (production, test, etc.) to this single array. See 4. Trigger the workflows for deployment instructions.

Last updated