Skip to content

chore: run setup-go after checkout #4143

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
May 19, 2025

Conversation

Juneezee
Copy link
Contributor

Description:

https://github.com/actions/setup-go/blob/main/README.md#caching-dependency-files-and-build-outputs

actions/setup-go uses the go.sum file to determine the cache key for Go modules. If it runs before actions/checkout, the go.sum file isn't available yet, so the cache cannot be properly restored.

This results in cache misses, as shown in the warnings below:

image

image

This PR fixes the issue by ensuring that all actions/setup-go steps are placed after actions/checkout, allowing go.sum to be present when the cache key is generated.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

  "Restore cache failed: Dependencies file is not found in
/home/runner/work/trufflehog/trufflehog. Supported file pattern: go.sum"

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@Juneezee Juneezee requested a review from a team as a code owner May 15, 2025 15:32
@Juneezee
Copy link
Contributor Author

@ahrav friendly ping

@ahrav
Copy link
Collaborator

ahrav commented May 19, 2025

@ahrav friendly ping

Thank you. I lost track of this one 😔 Also thank you for taking the time to get this fixed up, we really appreciate it. ❤️

@ahrav ahrav merged commit fa703ea into trufflesecurity:main May 19, 2025
12 of 13 checks passed
abmussani added a commit to bunnyanon/trufflehog that referenced this pull request May 21, 2025
* main: (121 commits)
  Fixed Grafana detector (trufflesecurity#4166)
  Reduce verbosity of chunk trace logging (trufflesecurity#4161)
  Increase postman logging verbosity (trufflesecurity#4160)
  Change github file extension log message verbosity (trufflesecurity#4159)
  docs: fix typos (trufflesecurity#4158)
  fix(twitch): Update Twitch detector to handle new RawV2 field and adjust test expectations (trufflesecurity#4150)
  Add a bunch of Postman logging (trufflesecurity#4154)
  Added DataBricks Analyzer (trufflesecurity#4135)
  fixed shopify detector line number (trufflesecurity#4149)
  chore: run setup-go after checkout (trufflesecurity#4143)
  Add per-chunk detection logging (trufflesecurity#4152)
  [Feat] Added Dropbox API OAuth2 Token Analyzer (trufflesecurity#4080)
  Updated Github Source Validate method (trufflesecurity#4144)
  replace anthropic reference with groq (trufflesecurity#4147)
  [Fix] Line number issue for custom detector (trufflesecurity#3997)
  fix(postman): prevent infinite recursion in variable substitution (trufflesecurity#4145)
  Add metrics to the Postman source (trufflesecurity#4142)
  [Feat] Implementation of Posthog Analyzer (trufflesecurity#4103)
  [Feat] Added Mux API Analyzer (trufflesecurity#4128)
  fixed name of netlify analyzer in cli output (trufflesecurity#4140)
  ...

# Conflicts:
#	pkg/pb/detectorspb/detectors.pb.go
#	proto/detectors.proto
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