Set up GitHub Actions variables and secrets for staging¶
This guide explains how to configure the credentials for the Starcraft team’s Ubuntu One staging account used by CI workflows.
Prerequisites¶
Before starting, ensure you have:
Administrator access to the target GitHub repository.
Access to the corporate password manager.
Access to the Starcraft Shared Accounts collection.
Retrieve the Starcraft team’s Ubuntu One staging account credentials¶
In the corporate password manager, locate the Starcraft Shared Accounts collection. Open the Ubuntu SSO Staging login.
Confirm the username is
starcraft-team+staging-sso@groups.canonical.com.Copy the login password when you are ready to paste it into GitHub.
Create the required GitHub entries¶
Add one Actions variable and one Actions secret to match the workflow configuration.
In the repository’s settings, under Secrets and variables > Actions, open the Variables tab.
Create a variable named
STAGING_SSO_USERNAMEwith valuestarcraft-team+staging-sso@groups.canonical.com.Open the Secrets tab.
Create a secret named
STAGING_SSO_PASSWORDwith the password from the Starcraft team’s Ubuntu One staging account.
Configure workflow access¶
If credentials fail to load during a workflow run, check:
vars.STAGING_SSO_USERNAMEexists.
secrets.STAGING_SSO_PASSWORDexists.The names match the workflow YAML exactly.
Use these values in a workflow¶
This example shows how to pass the variable and secret into a reusable workflow and expose them as environment variables for tests:
jobs:
test:
uses: canonical/starflow/.github/workflows/test-python.yaml@main
secrets:
secret-1: ${{ secrets.STAGING_SSO_PASSWORD }}
with:
extra-env-vars: |
STAGING_SSO_USERNAME=${{ vars.STAGING_SSO_USERNAME }}
STAGING_SSO_PASSWORD=$SECRET_1