- Must create Personal Access Token (PAT)
- Must create secret in the repo for created PAT
- Log in to your GitHub account.
- Click on your profile picture in the top-right corner of the page.
- From the dropdown menu, select "Settings".
- In the left sidebar, scroll down and click on "Developer settings".
- In the new left sidebar, click on "Personal access tokens".
- Click on "Tokens (classic)" if you want to create a classic token, or "Fine-grained tokens" for more granular control.
- Click on "Generate new token" (for classic) or "Generate new token (classic)" (for fine-grained).
- Give your token a descriptive name in the "Note" field.
- Set an expiration date for your token (recommended for security).
- Select the scopes or permissions you want to grant this token. Be careful to only select what you need.
- Scroll to the bottom and click "Generate token".
- Your new personal access token will be displayed. Make sure to copy it immediately and store it securely, as you won't be able to see it again.
- Access Repository
- Select the Settings tab
- In the left sidebar, scroll down and click on "Secrets and variables", then "Actions".
- Click on "New repository secret" in the "Repository secrets" section
- Name the secret "PERSONAL_ACCESS_TOKEN" , and paste in the token from the task "Generate Personal Access Token on GitHub"
- Click "Add secret"