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

VariableTypeValue TypeExampleComments
GHA_TOKENRepository SecretStringghp_...The GitHub PAT created in Prerequisites

GitHub App Credentials

These credentials are from the sfops-bot GitHub App:

VariableTypeValue TypeExampleComments
SFOPSBOT_APP_IDOrganization VariableString1768214The App ID from your GitHub App settings page
SFOPSBOT_APP_PRIVATE_KEYOrganization SecretString-----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):

VariableTypeValue TypeExampleComments
DOCKER_PUSH_TOKENRepository SecretStringghp_...GitHub PAT with write:packages permission (can reuse GHA_TOKEN)

Important: DOCKER_PUSH_TOKEN is recommended for pushing Docker images. While GITHUB_TOKEN can work if you grant repository access to the packages (see troubleshooting), a PAT with write:packages permission is more reliable and required for initial package creation.

Alternative to DOCKER_PUSH_TOKEN: If you prefer using GITHUB_TOKEN, you must grant your sfops repository write access to the container packages:

  1. Go to: https://github.com/orgs/YOUR_ORG/packages/container/sfops/settings
  2. Under "Manage Actions access", click "Add Repository"
  3. Add sfops with Write role
  4. Repeat for sfops-lite package

This is required because packages created by a PAT are owned by that user, not the repository.

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)

VariableTypeValue TypeExampleComments
BASE_REGISTRYRepository VariableStringsource.flxbl.ioKeep as source.flxbl.io for official images
BASE_REPORepository VariableStringflxblKeep as flxbl for official images
BASE_REGISTRY_USERNAMERepository SecretStringyour-usernameYour Gitea username
BASE_REGISTRY_TOKENRepository SecretStringgitea_tokenYour 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:

VariableTypeValue TypeExampleComments
BASE_REGISTRYRepository VariableStringghcr.ioGitHub Container Registry
BASE_REPORepository VariableStringyour-orgYour GitHub organization name
BASE_REGISTRY_USERNAMERepository SecretStringyour-usernameYour GitHub username
BASE_REGISTRY_TOKENRepository SecretStringghp_...Your GitHub PAT with read:packages (can reuse GHA_TOKEN)
BASE_IMAGE_NAMERepository VariableStringyour-sfp-proYour custom sfp-pro image name (defaults to sfp-pro)
BASE_LITE_IMAGE_NAMERepository VariableStringyour-sfp-liteYour 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:
VariableExample ValueComments
REPO_OWNERyour-orgYour GitHub organization name
PROJECT_REPOsf-coreYour production Salesforce repository
SFOPS_ACTION_REPOsfops-gh-actionsProduction actions repository
DASHBOARD_REPOsfops-dev-centralDev Central repository
SFP_SERVER_URLhttps://codev.example.comCodev Hub URL (use placeholder if not using Codev Hub yet)
SFOPS_IMAGEghcr.io/your-org/sfops:latestDocker image with latest tag
SFOPS_LITE_IMAGEghcr.io/your-org/sfops-lite:latestLite 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:
VariableExample ValueComments
REPO_OWNERyour-orgYour GitHub organization name
PROJECT_REPOsf-core-testYour test Salesforce repository
SFOPS_ACTION_REPOsfops-gh-actions-testTest actions repository
DASHBOARD_REPOsfops-dev-central-testTest Dev Central repository
SFP_SERVER_URLhttps://codev-test.example.comTest Codev Hub URL (use placeholder if not using Codev Hub yet)
SFOPS_IMAGEghcr.io/your-org/sfops:developmentDocker image with development tag
SFOPS_LITE_IMAGEghcr.io/your-org/sfops-lite:developmentLite 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.

These variables will be automatically set up during the set up of sfops in your repository by the FLXBL team. This guide is only applicable when you are setting up a self managed instance of sfops

On this page