Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 7e4e597

Browse files
authored
feat(gha): unify GHA - renovate, megalinter, markdown, and others (#152)
1 parent 03c67ec commit 7e4e597

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3711
-12997
lines changed

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Users referenced in this file will automatically be requested as reviewers for
2+
# PRs that modify the given paths
3+
# See https://help.github.com/articles/about-code-owners/, https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
5+
# All code
6+
* @ruzickap

.github/ISSUE_TEMPLATE/bug_report.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behaviour.
15+
16+
**Expected behaviour**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Additional context**
23+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+8
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

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
10+
**Is your feature request related to a problem? Please describe**
11+
A clear and concise description of what the problem is. Ex. I'm always
12+
frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
A clear and concise description of what you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
A clear and concise description of any alternative solutions or features you've considered.
19+
20+
**Additional context**
21+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

-6
This file was deleted.

.github/renovate.json5

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

.github/workflows/dependabot-auto-merge.yml

-15
This file was deleted.

.github/workflows/links.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Links
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/links.yml
8+
- lychee.toml
9+
schedule:
10+
- cron: "0 0 * * 1"
11+
12+
permissions: read-all
13+
14+
jobs:
15+
linkChecker:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
21+
- name: Setup Pages
22+
id: pages
23+
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
24+
25+
- name: Restore lychee cache
26+
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
27+
with:
28+
path: .lycheecache
29+
key: cache-lychee-${{ github.sha }}
30+
restore-keys: cache-lychee-
31+
32+
- name: Link Checker
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
36+
with:
37+
args: ". --exclude-path CHANGELOG.md ${{ steps.pages.outputs.base_url }}"
38+
fail: true

.github/workflows/linter.yml

-52
This file was deleted.

.github/workflows/markdown-check.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: markdown-check
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches-ignore:
7+
- main
8+
paths:
9+
- "**.md"
10+
- .github/workflows/markdown-check.yml
11+
- .markdownlint.yml
12+
- .mlc_config.json
13+
- .spelling
14+
15+
permissions: read-all
16+
17+
jobs:
18+
markdownlint-check:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22+
23+
- name: Markdown Lint
24+
uses: ruzickap/action-my-markdown-linter@919d3735df9bbc094d206521a774133ec8f3c4ca # v1.1.0
25+
with:
26+
exclude: |
27+
CHANGELOG.md
28+
29+
markdown-link-check:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
33+
34+
- name: Link Checker
35+
uses: ruzickap/action-my-markdown-link-checker@e7e8635735a15a86b081f8255022bcc251cc9003 # v1.2.0
36+
with:
37+
exclude: |
38+
CHANGELOG.md
39+
40+
markdown-spell-check:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
44+
45+
- name: Install Node.js LTS version
46+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
47+
48+
- name: Install markdown-spellcheck
49+
run: npm install -g markdown-spellcheck
50+
51+
- name: Run mdspell
52+
run: find . -type f \( -name "*.md" ! -name "CHANGELOG.md" \) -print0 | xargs -0 --max-args=1 --verbose mdspell --ignore-numbers --ignore-acronyms --report --en-gb

.github/workflows/mega-linter.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: MegaLinter
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches-ignore:
8+
- main
9+
10+
permissions: read-all
11+
12+
jobs:
13+
build:
14+
name: MegaLinter
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
19+
20+
- name: Restore lychee cache
21+
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
22+
with:
23+
path: .lycheecache
24+
key: cache-lychee-${{ github.sha }}
25+
restore-keys: cache-lychee-
26+
27+
- name: Extract commands from markdown files
28+
run: |
29+
set -euxo pipefail
30+
echo '#!/usr/bin/env bash' > README.sh
31+
find . -name '*.md' -print0 | while IFS= read -r -d '' FILE ; do
32+
# Extract: ```bash ... ```
33+
sed -n "/^\`\`\`\(bash\|shell\)$/,/^\`\`\`$/p" "${FILE}" | sed '/^```*/d' >> README.sh
34+
# Extract: ```bash ... ```
35+
sed -n "/^ \`\`\`\(bash\|shell\)$/,/^ \`\`\`$/p" "${FILE}" | sed '/^ ```*/d; s/^ //' >> README.sh
36+
done
37+
chmod a+x README.sh
38+
39+
- name: 💡 MegaLinter
40+
uses: oxsecurity/megalinter@688bc7466d7ab4faa83d614c2e6f9acf42b674dc # v7.8.0
41+
env:
42+
GITHUB_COMMENT_REPORTER: false
43+
GITHUB_STATUS_REPORTER: true
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/periodic-broken-link-checks.yml

-31
This file was deleted.

.github/workflows/release-please.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: release-please
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release-please-pr:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: google-github-actions/release-please-action@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e # v4.0.2
19+
with:
20+
release-type: simple

0 commit comments

Comments
 (0)