Skip to content

Commit 2f29aa9

Browse files
authored
feat(gh): add default github repo files (#2)
1 parent 214d5a8 commit 2f29aa9

21 files changed

+808
-147
lines changed

.checkov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
skip-check:
2+
# The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty
3+
- CKV_GHA_7

.github/CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# GitHub CODEOWNERS file
2+
# Documentation:
3+
# - https://help.github.com/articles/about-code-owners/
4+
# - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
5+
6+
# Syntax:
7+
# pattern @user-or-team
8+
# The last matching pattern takes precedence.
9+
10+
###############################
11+
# Repository Default Owners
12+
###############################
13+
# These owners will be the default owners for everything in the repo
14+
* @ruzickap

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "Bug: This is a sample issue title"
5+
labels: bug
6+
assignees: ruzickap
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behaviour.
14+
15+
**Expected behaviour**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Screenshots**
19+
If applicable, add screenshots to help explain your problem.
20+
21+
**Additional context**
22+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Actions Community Forum
4+
url: https://github.com/orgs/community/discussions/
5+
about: Please ask questions about GitHub Actions here.
6+
- name: GitHub Pages help
7+
url: https://help.github.com/en/github/working-with-github-pages
8+
about: GitHub Pages documentation here.

.github/ISSUE_TEMPLATE/proposal.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Proposal
3+
about: Suggest an idea for this project
4+
title: "Proposal: This is a sample title"
5+
labels: proposal
6+
assignees: ruzickap
7+
---
8+
9+
**Is your feature request related to a problem? Please describe**
10+
A clear and concise description of what the problem is. Ex. I'm always
11+
frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/renovate.json5

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
// # keep-sorted start block=yes
4+
"git-submodules": {
5+
enabled: true,
6+
},
7+
// Keep the extends started with ":" at the end of the list to allow overriding
8+
extends: [
9+
"config:recommended",
10+
"docker:pinDigests",
11+
"helpers:pinGitHubActionDigestsToSemver",
12+
"security:openssf-scorecard",
13+
":disableDependencyDashboard",
14+
":disableRateLimiting",
15+
":docker",
16+
":enableVulnerabilityAlertsWithLabel(security)",
17+
":pinSkipCi",
18+
],
19+
labels: [
20+
"renovate",
21+
"renovate/{{replace '.*/' '' depName}}",
22+
"renovate/{{updateType}}",
23+
],
24+
lockFileMaintenance: {
25+
enabled: true,
26+
schedule: ["before 6am on Sunday"],
27+
},
28+
// Package update rules
29+
packageRules: [
30+
{
31+
description: "Disable auto-merge for major updates",
32+
matchUpdateTypes: ["major"],
33+
automerge: false,
34+
},
35+
{
36+
description: "Ignore frequent renovate updates",
37+
enabled: false,
38+
matchPackageNames: ["renovatebot/github-action"],
39+
matchUpdateTypes: ["patch"],
40+
},
41+
{
42+
description: "Update renovatebot/github-action minor updates on Sundays",
43+
matchPackageNames: ["renovatebot/github-action"],
44+
matchUpdateTypes: ["minor"],
45+
schedule: ["* * * * 0"],
46+
},
47+
],
48+
prBodyTemplate: "{{{table}}}{{{notes}}}{{{changelogs}}}",
49+
rebaseWhen: "behind-base-branch",
50+
// Custom version extraction
51+
regexManagers: [
52+
{
53+
extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?<version>.+)${{/if}}",
54+
fileMatch: ["\\.ya?ml$", "\\.md$", "^Dockerfile$", "^entrypoint\\.sh$"],
55+
matchStrings: [
56+
'# renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)( versioning=(?<versioning>.+?))?( extractVersion=(?<extractVersion>.+?))?( registryUrl=(?<registryUrl>.+?))?\\s.*[=:]\\s*"?(?<currentValue>.+?)"?\\s',
57+
],
58+
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
59+
},
60+
],
61+
separateMinorPatch: true,
62+
// # keep-sorted end
63+
}

.github/workflows/codeql-actions.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CodeQL GitHub Actions"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
paths:
9+
- .github/workflows/*.yml
10+
schedule:
11+
- cron: 17 10 * * 2
12+
13+
permissions: read-all
14+
15+
jobs:
16+
analyze-actions:
17+
name: Analyze GitHub Actions
18+
runs-on: "ubuntu-latest"
19+
permissions:
20+
# required for all workflows
21+
security-events: write
22+
# required to fetch internal or private CodeQL packs
23+
packages: read
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
28+
# Initializes the CodeQL tools for scanning.
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
31+
with:
32+
languages: actions
33+
build-mode: none
34+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
35+
queries: security-extended
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
39+
with:
40+
category: "/language:actions"

.github/workflows/linter.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/mega-linter.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: mega-linter
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches-ignore:
8+
- main
9+
10+
permissions: read-all
11+
12+
jobs:
13+
github-context:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Debug
17+
env:
18+
GITHUB_CONTEXT: ${{ toJson(github) }}
19+
run: |
20+
echo "${GITHUB_CONTEXT}"
21+
22+
mega-linter:
23+
runs-on: ubuntu-latest
24+
if: ${{ (!startsWith(github.ref_name, 'renovate/') && !startsWith(github.ref_name, 'release-please--')) || github.event_name == 'workflow_dispatch' }}
25+
timeout-minutes: 30
26+
steps:
27+
- name: Checkout Code
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
30+
- name: Extract commands from markdown files
31+
run: |
32+
set -euxo pipefail
33+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
34+
brew install mdq
35+
echo '#!/usr/bin/env bash' > README.sh
36+
readarray -d '' MD_FILES < <(find . -type f -name "*.md" -print0)
37+
mdq '```/^bash$|^shell$|^sh$/' --br -o plain "${MD_FILES[@]}" >> README.sh || true
38+
chmod a+x README.sh
39+
40+
- name: 💡 MegaLinter
41+
uses: oxsecurity/megalinter@04cf22b980c2e9c2121553417ed651c944afc8e1 # v8.6.0
42+
env:
43+
GITHUB_COMMENT_REPORTER: false
44+
# Disabled due to error: [GitHub Status Reporter] Error posting Status for REPOSITORY with ...: 403
45+
GITHUB_STATUS_REPORTER: false
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)