Skip to content

Commit

Permalink
chore: Fix Renovate config (#3635)
Browse files Browse the repository at this point in the history
# Summary

Fixes renovate config to use the
[`config:best-practices`](https://docs.renovatebot.com/presets-config/#configbest-practices)
preset rather than the `config:base` preset since `config:base` seems to
have gone away at some point.

Also fixes the `schedule` config by using the
[`schedule:monthly`](https://docs.renovatebot.com/presets-schedule/#schedulemonthly)
preset. The previous `schedule` config seems to have been invalid
because "4 am" had space between "4" and "am" (this was fixed in the
`slsa-verifier` repo on
slsa-framework/slsa-verifier#727 but was never
fixed here).

Also adds a pre-submit to run the
[`renovate-config-validator`](https://docs.renovatebot.com/config-validation/)
to ensure that renovate config is valid. This pre-submit will need to be
made required in the repository branch protection rule for `main` in the
repository settings after this PR is merged.

Fixes #3634 #404 

## Testing Process

- Run `make renovate-config-validator` to check that the config is
valid.

## Checklist

- [x] Review the contributing
[guidelines](https://github.com/slsa-framework/slsa-github-generator/blob/main/CONTRIBUTING.md)
- [x] Add a reference to related issues in the PR description.
- [x] Update documentation if applicable.
- [x] Add unit tests if applicable.
- [x] Add changes to the
[CHANGELOG](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
if applicable.

---------

Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
Co-authored-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
  • Loading branch information
ianlewis and ramonpetgrave64 committed May 15, 2024
1 parent a9e209a commit 89cdf20
Show file tree
Hide file tree
Showing 5 changed files with 20,957 additions and 9,787 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/pre-submit.lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 16
node-version: 20
- run: make markdownlint

markdown-toc:
name: markdown-toc
runs-on: ubuntu-latest
steps:
- name: Setup Node.js 16
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 16
node-version: 20
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: make markdown-toc
- name: markdown-toc
Expand Down Expand Up @@ -118,9 +117,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- env:
YAMLLINT_VERSION: "1.26.3"
run: |
- run: |
set -euo pipefail
# Install yamllint
Expand All @@ -135,9 +132,18 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 16
node-version: 20
- run: make eslint

renovate-config-validator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 20
- run: make renovate-config-validator

autogen:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ markdown-toc: node_modules/.installed ## Runs markdown-toc on markdown files.
#####################################################################

.PHONY: lint
lint: markdownlint golangci-lint shellcheck eslint yamllint actionlint ## Run all linters.
lint: markdownlint golangci-lint shellcheck eslint yamllint actionlint renovate-config-validator ## Run all linters.

.PHONY: actionlint
actionlint: ## Runs the actionlint linter.
Expand Down Expand Up @@ -266,6 +266,10 @@ yamllint: ## Runs the yamllint linter.
fi; \
yamllint --strict -c .yamllint.yaml . $$extraargs

.PHONY: renovate-config-validator
renovate-config-validator: node_modules/.installed ## Runs renovate-config-validator
@npm run renovate-config-validator

## Maintenance
#####################################################################

Expand Down
Loading

0 comments on commit 89cdf20

Please sign in to comment.