forked from port-labs/cookiecutter-gha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(BUILD-5443): SQ, pre-commit, Renovate
- Loading branch information
1 parent
5526f72
commit 3ca0cab
Showing
7 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
* @sonarsource/platform-devinfra-squad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>SonarSource/renovate-config:dev-infra-squad"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Pre-commit checks | ||
on: | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
pre-commit: | ||
name: "pre-commit" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: SonarSource/gh-action_pre-commit@f04ea4aa921469a3f203f82f8965d3a308f59d91 # 0.0.7 | ||
with: | ||
extra-args: --from-ref=origin/${{ github.event.pull_request.base.ref }} --to-ref=${{ github.event.pull_request.head.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: SonarQube Scan | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
||
jobs: | ||
next: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: write | ||
pull-requests: read | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- id: secrets | ||
uses: SonarSource/vault-action-wrapper@3996073b47b49ac5c58c750d27ab4edf469401c8 # 3.0.1 | ||
with: | ||
secrets: | | ||
development/kv/data/next token | sq_next_token; | ||
development/kv/data/next url | sq_next_url; | ||
- name: SonarQube Next Scan | ||
uses: sonarsource/sonarqube-scan-action@aecaf43ae57e412bd97d70ef9ce6076e672fe0a9 # v2.3.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).sq_next_token }} | ||
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).sq_next_url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
default: true | ||
|
||
MD013: | ||
line_length: 140 | ||
tables: false | ||
|
||
MD031: # Fenced code blocks should be surrounded by blank lines | ||
# Disable for list_items to create a tight list containing a code fence | ||
list_items: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-executables-have-shebangs | ||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: 5341f388c2a962d3bc66e075f00b80ab45b15f24 # v0.1.20 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/renovatebot/pre-commit-hooks | ||
rev: 32ee411cf36142e6082f10870ae62172ce9af133 # frozen: 35.32.0 | ||
hooks: | ||
- id: renovate-config-validator | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 20447075e31543a8b125f2df18d75f3b5e7d4d2e # frozen: 0.22.0 | ||
hooks: | ||
- id: check-github-actions | ||
- id: check-github-workflows | ||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: 5341f388c2a962d3bc66e075f00b80ab45b15f24 # v0.1.20 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: c9ea83146232fb263effdfe6f222d87f5395b27a # v0.39.0 | ||
hooks: | ||
- id: markdownlint | ||
- repo: https://github.com/renovatebot/pre-commit-hooks | ||
rev: 32ee411cf36142e6082f10870ae62172ce9af133 # frozen: 35.32.0 | ||
hooks: | ||
- id: renovate-config-validator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters