Skip to content

Use GH_TOKEN environment variable in auto merge workflow #7656

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

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

absidue
Copy link
Member

@absidue absidue commented Jul 10, 2025

Pull Request Type

  • Other

Description

In the auto-merge workflow we currently write the PUSH_TOKEN to a file, pipe it into the gh auth login command and then delete that file, these days however gh also supports reading the token from the GH_TOKEN environment variable, which is also the documented way to use gh in GitHub Actions (see link below). This pull request switches to using that environment variable and also disables all permissions for the standard GITHUB_TOKEN token as we don't use it in this workflow.

https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows

Testing

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 10, 2025 12:40
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 10, 2025
@FreeTubeBot FreeTubeBot merged commit 26191f0 into FreeTubeApp:development Jul 11, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 11, 2025
@absidue absidue deleted the auto-merge-env-var branch July 12, 2025 06:21
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.

5 participants