Skip to content

Bump actions/setup-go from 2 to 7 - #81

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/setup-go-7
Open

Bump actions/setup-go from 2 to 7#81
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/setup-go-7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 20, 2026

Copy link
Copy Markdown

Bumps actions/setup-go from 2 to 7.

Release notes

Sourced from actions/setup-go's releases.

v7.0.0

What's Changed

New Contributors

Full Changelog: actions/setup-go@v6...v7.0.0

v6.5.0

What's Changed

Dependency update

New Contributors

Full Changelog: actions/setup-go@v6...v6.5.0

v6.4.0

What's Changed

Enhancement

Dependency update

Documentation update

New Contributors

Full Changelog: actions/setup-go@v6...v6.4.0

v6.3.0

What's Changed

Full Changelog: actions/setup-go@v6...v6.3.0

v6.2.0

What's Changed

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by CodeRabbit

  • Chores
    • Updated the release process to use a newer Go setup action.
    • Existing multi-platform builds, checksum generation, and release asset publishing remain unchanged.

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 7.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v2...v7)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Walkthrough

The release workflow updates its Go toolchain setup action from actions/setup-go@v2 to actions/setup-go@v7; all other release steps remain unchanged.

Changes

Release workflow

Layer / File(s) Summary
Go toolchain action update
.github/workflows/publish-release.yaml
The Go setup step now uses actions/setup-go@v7 instead of actions/setup-go@v2.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: upgrading actions/setup-go from v2 to v7.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed The PR only bumps actions/setup-go in a release workflow; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons were added.
Container-Privileges ✅ Passed PR only bumps actions/setup-go in a GitHub Actions workflow; no container/K8s manifests or privilege flags like privileged, hostPID, or allowPrivilegeEscalation are present.
No-Sensitive-Data-In-Logs ✅ Passed The workflow change only bumps setup-go; no print/echo/debug logging was added, and secrets are used only in request headers.
No-Hardcoded-Secrets ✅ Passed PASS: the workflow only references ${{ secrets.GITHUB_TOKEN }} and adds no literal API keys, passwords, private keys, or embedded credentials.
No-Injection-Vectors ✅ Passed The PR only bumps actions/setup-go to v7; no SQL/shell/eval/yaml/pickle/dangerous HTML patterns are added in the changed workflow line.
Ai-Attribution ✅ Passed No AI-tool usage is mentioned in the PR or commit; the commit has only Dependabot trailers and no Assisted-by/Generated-by/Co-Authored-By markers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dependabot/github_actions/actions/setup-go-7

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-release.yaml:
- Around line 27-29: Update the actions/setup-go step in the release workflow to
use an immutable full commit SHA instead of the mutable v7 tag, and set its
cache input to false. Preserve the existing Go version configuration and
release-job behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 76306b07-7668-47c9-9a13-0fadbef4959d

📥 Commits

Reviewing files that changed from the base of the PR and between 8232d5e and 75987bb.

📒 Files selected for processing (1)
  • .github/workflows/publish-release.yaml

Comment on lines +27 to 29
uses: actions/setup-go@v7
with:
go-version: '1.17'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files .github/workflows/publish-release.yaml
echo "---"
cat -n .github/workflows/publish-release.yaml | sed -n '1,120p'
echo "---"
python3 - <<'PY'
import urllib.request, json
url = "https://api.github.com/repos/actions/setup-go/releases/latest"
req = urllib.request.Request(url, headers={"Accept":"application/vnd.github+json","User-Agent":"code-review"})
with urllib.request.urlopen(req, timeout=20) as r:
    data = json.load(r)
print("latest_release_tag:", data.get("tag_name"))
PY

Repository: openshift-online/ocm-support-cli

Length of output: 7192


🌐 Web query:

actions/setup-go v7 cache default documentation

💡 Result:

In actions/setup-go v7, caching is enabled by default [1][2][3]. The action automatically manages the caching and restoration of Go modules and build outputs [1][2]. Key details regarding the default caching behavior: Default Dependency File: By default, the action uses go.mod as the dependency file to calculate the cache key [1][2]. This is a change from earlier versions that defaulted to go.sum [4][5]. Controlling Caching: - To disable caching, you can set the cache input to false (e.g., cache: false) [1][2][3]. - To use a different dependency file or to revert to using go.sum, you can specify the path using the cache-dependency-path input [1][2][3]. This input supports glob patterns if you have multiple dependency files or files located in subdirectories [1][2]. Example configuration: - uses: actions/setup-go@v7 with: go-version: '1.23' # Caching is enabled by default. To disable: # cache: false # To specify a different dependency file: # cache-dependency-path: 'go.sum'

Citations:


Pin actions/setup-go and disable cache for this release job.
actions/setup-go@v7 is mutable, and v7 enables Go caching by default. Pin it to a full SHA and set cache: false unless shared cache behavior is intentional here.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 27-27: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default

(cache-poisoning)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish-release.yaml around lines 27 - 29, Update the
actions/setup-go step in the release workflow to use an immutable full commit
SHA instead of the mutable v7 tag, and set its cache input to false. Preserve
the existing Go version configuration and release-job behavior.

Sources: Path instructions, Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants