Configuring the GitHub Actions workflow for a private container registry


To configure a variable and secret

  1. In your GitHub repository, select Settings > Security.
  2. Expand Secrets and Variables.
  3. Select Actions > Variables tab > New repository variable.
  4. Enter the variable name for your container registry user ID and the ID value, and click Add variable.
  5. Select Actions > Secrets tab > New repository secret.
  6. Enter the secret name for your container registry user password and the password value, and click Add secret.

To configure the workflow script

After tagging and pushing the Universal Connector container image to the private container registry and creating the GitHub Actions variable and secret, define the image and credentials for the private container registry for access to the image with the following script:

jobs:
  <jobname>:
    runs-on: <runnerName>
    container:
      image:attach:xwiki:Mainframe.Data-for-Db2.BMC-AMI-SQL-Assurance-for-Db2.COB13100.Installing.Configuring-the-GitHub-Actions-workflow-for-a-private-container-registry.WebHome@filename <newTag>
      options: -u <uid>
      credentials:
        username: $~{~{ vars.variableContainerRegistryUserName }}
        password: $~{~{ secrets.secretContainerRegristryUserPassword }}

Variable

Description

jobName

Job name that runs in the workflow.

runnerName

Runner that the job runs on.

newTag

Private container image to be used in the workflow.

uid

User identifier (number assigned to Linux user) to run the container process and runner owner.

variableContainerRegistryUserName

Variable defined for the container registry user ID

secretContainerRegistryUserPassword

Secret defined for the container registry user password

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*