Configuring the GitHub Actions workflow for a private container registry
To configure a variable and secret
- In your GitHub repository, select Settings > Security.
- Expand Secrets and Variables.
- Select Actions > Variables tab > New repository variable.
- Enter the variable name for your container registry user ID and the ID value, and click Add variable.
- Select Actions > Secrets tab > New repository secret.
- 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-DevOps-for-Db2.AMA13100.Installing.Configuring-the-GitHub-Actions-workflow-for-a-private-container-registry.WebHome@filename <newTag>
options: -u <uid>
credentials:
username: $~{~{ vars.variableContainerRegistryUserName }}
password: $~{~{ secrets.secretContainerRegristryUserPassword }}
<jobname>:
runs-on: <runnerName>
container:
image:attach:xwiki:Mainframe.Data-for-Db2.BMC-AMI-DevOps-for-Db2.AMA13100.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*