Skip to content

Commit

Permalink
Update gitleaks action to 1.2.0 (#194)
Browse files Browse the repository at this point in the history
* Update gitleaks action to 1.2.0

* Exclude gitleaks from dependabot updates
  • Loading branch information
stone-z authored Dec 14, 2020
1 parent a836f00 commit 1f879f2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## Changed

- Update `gitleaks action` to version `1.2.0` using `gitleaks` version `7.2.0`.

## [4.0.0] - 2020-12-08

## Removed

- Remove `go mod tidy` workflow.
- Remove `go mod tidy` workflow.

## Added

Expand Down
18 changes: 12 additions & 6 deletions pkg/gen/input/dependabot/internal/file/dependabot.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ func NewCreateDependabotInput(p params.Params) input.Input {
Path: filepath.Join(p.Dir, "dependabot.yml"),
TemplateBody: createDependabotTemplate,
TemplateData: map[string]interface{}{
"EcosystemGomod": params.EcosystemGomod(p),
"Ecosystems": params.Ecosystems(p),
"Header": params.Header("#"),
"Interval": params.Interval(p),
"Reviewers": params.Reviewers(p),
"EcosystemGithubActions": params.EcosystemGithubActions(p),
"EcosystemGomod": params.EcosystemGomod(p),
"Ecosystems": params.Ecosystems(p),
"Header": params.Header("#"),
"Interval": params.Interval(p),
"Reviewers": params.Reviewers(p),
},
}

Expand All @@ -26,6 +27,7 @@ func NewCreateDependabotInput(p params.Params) input.Input {
var createDependabotTemplate = `{{ .Header }}
{{- $interval := .Interval }}
{{- $ecosystemGomod := .EcosystemGomod }}
{{- $ecosystemGithubActions := .EcosystemGithubActions }}
{{- $reviewers := .Reviewers }}
version: 2
updates:
Expand All @@ -47,6 +49,10 @@ updates:
- dependency-name: k8s.io/*
versions:
- ">=0.19.0"
{{- end }}
{{- end }}
{{- if eq $ecosystem $ecosystemGithubActions }}
ignore:
- dependency-name: zricethezav/gitleaks-action
{{- end }}
{{- end }}
`
4 changes: 4 additions & 0 deletions pkg/gen/input/dependabot/internal/params/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ func Ecosystems(p Params) []string {
return p.Ecosystems
}

func EcosystemGithubActions(p Params) string {
return gen.EcosystemGithubActions.String()
}

func EcosystemGomod(p Params) string {
return gen.EcosystemGomod.String()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gen/input/workflows/internal/file/gitleaks.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
with:
fetch-depth: '0'
- name: gitleaks-action
uses: zricethezav/gitleaks-action@v1.1.4
uses: zricethezav/gitleaks-action@v1.2.0
`

0 comments on commit 1f879f2

Please sign in to comment.