Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PAT for scheduled workflows #40

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Use PAT for scheduled workflows #40

merged 3 commits into from
Apr 11, 2023

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) <[email protected]>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
@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