Skip to content

Commit df663f0

Browse files
committed
chore: add/update default repository files
- Add standardized GitHub workflows - Update linting and security configurations - Add documentation templates - Update development tools configuration Generated by multi-gitter
1 parent 8b66019 commit df663f0

File tree

8 files changed

+53
-20
lines changed

8 files changed

+53
-20
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
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.
3+
- name: 📚 Documentation
4+
url: https://github.com/ruzickap/action-my-broken-link-checker/blob/main/README.md
5+
about: Read the documentation before reporting issues
6+
- name: 🔒 Security Vulnerabilities
7+
url: https://github.com/ruzickap/action-my-broken-link-checker/blob/main/SECURITY.md
8+
about: Report security vulnerabilities privately following our security policy

.github/renovate.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
enabled: true,
4141
schedule: ["before 6am on Sunday"],
4242
},
43+
// Wait for releases to be at least 3 days old before creating PRs (reduces risk of buggy releases)
44+
minimumReleaseAge: "3 days",
4345
// Package-specific Update Rules
4446
packageRules: [
4547
{

.github/workflows/codeql.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ on:
1414
schedule:
1515
- cron: 17 10 * * 2
1616

17-
permissions:
18-
security-events: write
19-
packages: read
17+
permissions: read-all
2018

2119
jobs:
2220
codeql:
2321
runs-on: ubuntu-latest
22+
permissions:
23+
security-events: write
24+
packages: read
2425
steps:
2526
- name: Checkout repository
2627
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/docker-image.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030
strategy:
3131
matrix:
32-
os:
33-
- ubuntu-latest
34-
- ubuntu-24.04-arm
32+
os: [ubuntu-latest, ubuntu-24.04-arm]
3533
steps:
3634
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3735

.github/workflows/mega-linter.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,49 @@ jobs:
2020
steps:
2121
- name: Checkout Code
2222
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
with:
24+
fetch-depth: 2
25+
26+
- name: Get changed files
27+
id: changed-files
28+
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
29+
with:
30+
files: |
31+
**/*.md
2332
2433
# Extract shell commands from markdown code blocks for validation
25-
# This creates a README.sh file containing all bash/shell/sh code blocks
34+
# This creates a shell_commands_from_md.sh file containing all bash/shell/sh code blocks
2635
# from markdown files to ensure they are syntactically correct
2736
- name: Extract commands from markdown files
37+
if: steps.changed-files.outputs.any_changed == 'true'
38+
env:
39+
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
2840
run: |
2941
set -euxo pipefail
3042
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
31-
brew install mdq
32-
echo '#!/usr/bin/env bash' > README.sh
33-
readarray -d '' MD_FILES < <(find . -type f -name "*.md" -print0)
34-
mdq '```/^bash$|^shell$|^sh$/' --br -o plain "${MD_FILES[@]}" >> README.sh || true
35-
chmod a+x README.sh
43+
brew install mq
44+
echo '#!/usr/bin/env bash' > shell_commands_from_md.sh
45+
read -ra FILES <<< "${ALL_CHANGED_FILES}"
46+
mq 'select(.code.lang == "bash" || .code.lang == "shell" || .code.lang == "sh") | to_text()' "${FILES[@]}" >> shell_commands_from_md.sh
47+
chmod a+x shell_commands_from_md.sh
48+
49+
- name: Restore lychee cache
50+
id: restore-cache
51+
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
52+
with:
53+
path: .lycheecache
54+
key: cache-lychee-${{ github.sha }}
55+
restore-keys: cache-lychee-
3656

3757
- name: 💡 MegaLinter
3858
uses: oxsecurity/megalinter@55a59b24a441e0e1943080d4a512d827710d4a9d # v9.2.0
3959
env:
4060
GITHUB_COMMENT_REPORTER: false
4161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: Save lychee cache
64+
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
65+
if: always() && steps.restore-cache.outputs.cache-primary-key
66+
with:
67+
path: .lycheecache
68+
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

.github/workflows/pr-slack-notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
echo "${TS}" > slack-message-timestamp.txt
4848
4949
- name: Cache slack message timestamp
50-
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
50+
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
5151
with:
5252
path: slack-message-timestamp.txt
5353
key: slack-message-timestamp-${{ github.event.pull_request.html_url }}-${{ steps.message.outputs.ts }}

.github/workflows/readme-commands-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ permissions: read-all
2222

2323
jobs:
2424
readme-commands-check:
25+
runs-on: ${{ matrix.os }}
2526
strategy:
2627
matrix:
2728
os: [ubuntu-latest, ubuntu-24.04-arm]
28-
runs-on: ${{ matrix.os }}
2929
steps:
3030
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3131

lychee.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
# Enable link caching to avoid checking the same links on multiple runs
77
cache = true
88

9+
# Exclude certain status codes from cache (temporary failures may succeed later):
10+
# 403 = Forbidden (bot blocking can be intermittent)
11+
# 429 = Too Many Requests (rate limiting is temporary)
12+
cache_exclude_status = [403, 429]
13+
914
############################# Requests ############################
1015

1116
# Accept these status codes as valid (200 = OK, 429 = rate limited)

0 commit comments

Comments
 (0)