Skip to content

Commit

Permalink
Adds some logging to print if running in a github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Marin Dzhigarov committed Jan 10, 2025
1 parent a883f6f commit 661fd9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testing/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ func WriteKeys(rootPath string) error {
isGitHubActions := os.Getenv("GITHUB_ACTIONS") == "true"
var keyPerm os.FileMode
if isGitHubActions {
logrus.Infof("Running in GitHub Actions")
keyPerm = 0444 // Use 0444 if running in GitHub Actions
} else {
logrus.Infof("Not running in GitHub Actions")
keyPerm = 0600 // Use 0600 if not running in GitHub Actions (default case)
}
pkPath := filepath.Join(rootPath, "id_rsa")
Expand Down

0 comments on commit 661fd9e

Please sign in to comment.