Configuring Repository Variables and Secrets on GitHub

In order to customize and secure your project environment, you need to set up variables and secrets within your GitHub repository. These are accessible in the repository settings under the Settings tab. Follow these steps to add the necessary variables:

  1. Access Repository Settings:

    • Navigate to your GitHub repository page.

    • Click on the Settings tab located at the top of the page.

  2. Navigate to Secrets Section:

    • First, open the Settings tab of your project or repository.

    • In the left sidebar, scroll down to find the Secrets and Variables section.

    • Click on Actions within this section.

    • Then, select Variables.

    • To add new repository variables, click on New Repository Variable.

border-image secret01

  1. Set Up Variables:

    • Project Name: Define the DOCS_PROJECT_NAME with the name of your project.

    • Author Name: For Name, input DOCS_AUTHOR. For Value, enter the author’s full name.

    • Author Email: Add a new secret with Name as DOCS_EMAIL and the value as the author’s email address.

    • Module: Use DOCS_MODULE for the Name and the specific module name for the Value. Note that this should be the name of the repository.

    • Submodule: If your project has submodules, use DOCS_SUBMODULE for the Name and the specific submodule name for the Value. This should also correspond to the name of the repository. For example, for a repository named gcpds.docs, DOCS_MODULE would be gcpds and DOCS_SUBMODULE would be docs.

border-image secret02

  1. Save Each Variable:

    • After entering the name and value for each variable, click the Add secret button to save it.

  2. Review and Maintain Secrets:

    • Make sure to review your secrets and variables regularly.

    • Update them as necessary to keep your environment secure and up to date.

Remember that secrets are encrypted environment variables created in your repository settings. They are not passed to workflows that are triggered by a pull request from a fork.