Skip to content

Commit

Permalink
feat: add github defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Jul 7, 2024
1 parent 7f3e315 commit 35ba007
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
// Keep the extends started with ":" at the end of the list to allow overriding
extends: [
"config:recommended",
"docker:pinDigests",
"helpers:pinGitHubActionDigestsToSemver",
"security:openssf-scorecard",
":disableDependencyDashboard",
":docker",
":disableRateLimiting",
":docker",
":enableVulnerabilityAlertsWithLabel(security)",
":pinSkipCi",
],
"git-submodules": {
enabled: true,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
# Extract: ```bash ... ```
sed -n "/^ \`\`\`\(bash\|shell\)$/,/^ \`\`\`$/p" "${FILE}" | sed '/^ ```*/d; s/^ //' >> README.sh
done
ls -la README.sh
chmod a+x README.sh
- name: 💡 MegaLinter
uses: oxsecurity/megalinter@5199c6377b4cb7faff749a1971636f3343db9fe6 # v7.12.0
uses: oxsecurity/megalinter@bacb5f8674e3730b904ca4d20c8bd477bc51b1a7 # v7.13.0
env:
GITHUB_COMMENT_REPORTER: false
GITHUB_STATUS_REPORTER: true
# Disabled due to error: [GitHub Status Reporter] Error posting Status for REPOSITORY with ...: 403
GITHUB_STATUS_REPORTER: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
with:
release-type: simple
token: ${{ steps.app-token.outputs.token }}
9 changes: 5 additions & 4 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- main
- "!renovate/*"
schedule:
- cron: "0 0,2,4 * * 0"
- cron: "0 0-3 * * 0"

env:
# https://docs.renovatebot.com/troubleshooting/#log-debug-levels
Expand All @@ -45,6 +45,7 @@ jobs:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -53,9 +54,9 @@ jobs:
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: "${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}"
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- name: 💡 Self-hosted Renovate
uses: renovatebot/github-action@78bdcb3bffa5e95e646183ca0a2ac2895abd6a20 # v40.1.3
uses: renovatebot/github-action@259200be4d976a76196ec8985b0dddcaf1733b47 # v40.2.0
with:
token: "${{ steps.app-token.outputs.token }}"
token: ${{ steps.app-token.outputs.token }}
9 changes: 8 additions & 1 deletion .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: semantic-pull-request

on:
workflow_dispatch:
pull_request_target:
types:
- opened
Expand All @@ -15,6 +16,12 @@ jobs:
semantic-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
id: app-token
with:
app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }}
private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }}

- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: stale

on:
workflow_dispatch:
schedule:
- cron: "9 9 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ REPOSITORY_DEVSKIM_ARGUMENTS: --ignore-globs CHANGELOG.md --ignore-rule-ids DS16

REPOSITORY_KICS_ARGUMENTS: --fail-on high

REPOSITORY_TRIVY_ARGUMENTS: --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL
REPOSITORY_TRIVY_ARGUMENTS: --ignorefile .trivyignore.yaml --severity HIGH,CRITICAL --ignore-unfixed

TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES:
- GITHUB_TOKEN
Expand Down
3 changes: 2 additions & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ exclude = [
# Ignore all URLs with '{ ... }' - BASH / Ansible variable in URL
'%7B.*%7D',
# Ignore all URLs which starts with 'file://'
'file://'
'file://',
]

# Exclude these filesystem paths from getting checked
exclude_path = [
"CHANGELOG.md",
"package-lock.json",
]

# Exclude all private IPs from checking.
Expand Down

0 comments on commit 35ba007

Please sign in to comment.