-
Notifications
You must be signed in to change notification settings - Fork 3
GitHub Configure Secrets for Build Actions
To configure secrets in your GitHub repository, follow these steps:
-
Go to your GitHub repository's page.
-
Click on the "Settings" tab.
-
In the left sidebar, click on "Secrets".
-
Click on the "New repository secret" button.
-
Enter the name and value for each secret. In this case, you will need to add two secrets: DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD.
-
After entering the secret name and value, click on the "Add secret" button to save it.
-
Repeat the process to add the second secret.
Make sure to set the values of the secrets correctly:
- For DOCKERHUB_USERNAME, enter your Docker Hub username.
- For DOCKERHUB_PASSWORD, enter your Docker Hub password or a personal access token with appropriate permissions.
Once you have configured the secrets, you can reference them in your GitHub Actions workflow YAML file using the ${{ secrets.SECRET_NAME }} syntax. For example, ${{ secrets.DOCKERHUB_USERNAME }} and ${{ secrets.DOCKERHUB_PASSWORD }}.
By using secrets, you can securely store sensitive information without exposing it in your workflow file or repository.
Written by Oscar Garcia Contact Twitter @ozkary Website ozkary.com