usecase

  • The aim of this tutorial🔍 is a successful setup of secrets to authenticate a request to Zendesk Help Center API

1. Secret creation

  • Open repo
  • Go to SettingsSecretsAdd a new secret
  • Enter secret name
  • Enter secret value
  • Select Add secret

create_a_secret

  • Open workflow file .\github\workflows\mail.yaml
  • Add to the step (you can also add this to different levels of the workflow)
  • $

adding_secret

  • the whole workflow that checks out my private repo, runs a publish script located in that repo, and then checks in changes done by that script look as follows

github_action_workflow_file

2. what are secrets

  • encrypted environment variables to be used in workflows

3. how do you make a secret available to an action?

  • either set as input in a workflow file (not covered here)
  • or set as an environment variable in a workflow file

4. github token

  • a secret automatically generated
  • can be used in a workflow
  • this is an access token that you can use to authenticate on behalf of the GitHub App installed on your repo responsible for running actions
  • constraint: only your repo
  • same as with other secrets, you need to refer it within the workflow file to make authenticated GitHub API calls with

github_token_secret

  • usecases: running automated github workflows for features within github (adding labels, creating issues, etc)

5. list used sources