Skip to content

Commit

Permalink
sign when building locally
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Jul 6, 2021
1 parent 39e2529 commit cff7097
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions do/upload_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ const (
maxS3Results = 1000
)

// we should only sign and upload to s3 if this is my repo
// and a push event
// we should only sign and upload to s3 if this is my repo and a push event
// or building locally
// don't sign if it's a fork or pull requests
func shouldSignAndUpload() bool {
// https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables

repo := os.Getenv("GITHUB_REPOSITORY")
if repo == "" {
// building locally e.g. release for final testing
// we want to sign it
return true
}
if repo != "sumatrapdfreader/sumatrapdf" {
return false
}
Expand Down

0 comments on commit cff7097

Please sign in to comment.