8000 Inject token into bump-go workflow by williammartin · Pull Request #11233 · cli/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Inject token into bump-go workflow #11233

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 2 commits into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/bump-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ jobs:
GIT_AUTHOR_NAME: cli automation
GIT_COMMITTER_EMAIL: noreply@github.com
GIT_AUTHOR_EMAIL: noreply@github.com
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Preview
Copilot AI Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an explicit permissions block at the top of the workflow (e.g., permissions: contents: write) to limit the scope of GITHUB_TOKEN and follow the principle of least privilege.

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is already there.

run: |
bash .github/workflows/scripts/bump-go.sh --apply go.mod
3 changes: 3 additions & 0 deletions .github/workflows/scripts/bump-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ if [[ "$CURRENT_TOOLCHAIN_DIRECTIVE" != "go$TOOLCHAIN_VERSION" ]]; then
echo " • toolchain $CURRENT_TOOLCHAIN_DIRECTIVE → go$TOOLCHAIN_VERSION"
fi

# ---- Run go mod tidy to ensure .0 minor version is added to go directive ----
go mod tidy

rm -f "$GO_MOD.bak"

git add "$GO_MOD"
Expand Down
Loading
0