Skip to content

Use PAT for scheduled workflows#40

Merged
max-lobur merged 3 commits intomainfrom
scheduled_to_use_pat
Apr 11, 2023
Merged

Use PAT for scheduled workflows#40
max-lobur merged 3 commits intomainfrom
scheduled_to_use_pat

Conversation

@max-lobur
Copy link
Contributor

@max-lobur max-lobur commented Apr 10, 2023

what

  • Use PAT for scheduled

why

  • To let auto-generated PR automatically trigger other workflows.
When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by 
the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, 
will not create a new workflow run. This prevents you from accidentally creating 
recursive workflow runs. For example, if a workflow run pushes code using the 
repository's GITHUB_TOKEN, a new workflow will not run even when the repository 
contains a workflow configured to run when push events occur. For more information, 
see "Automatic token authentication."

If you do want to trigger a workflow from within a workflow run, you can use a 
personal access token instead of GITHUB_TOKEN to trigger events that require a 
token. You'll need to create a personal access token and store it as a secret. 

references

https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow

max-lobur and others added 2 commits April 11, 2023 12:26
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
@max-lobur max-lobur merged commit 9e85e74 into main Apr 11, 2023
@max-lobur max-lobur deleted the scheduled_to_use_pat branch April 11, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants