Skip to content

feat(gha): unify GHA - renovate, megalinter, markdown, ... #16

feat(gha): unify GHA - renovate, megalinter, markdown, ...

feat(gha): unify GHA - renovate, megalinter, markdown, ... #16

Workflow file for this run

---
name: MegaLinter
on:
workflow_dispatch:
push:
branches-ignore:
- main
permissions: read-all
jobs:
build:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Restore lychee cache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Extract commands from markdown files
run: |
set -euxo pipefail
echo '#!/usr/bin/env bash' > README.sh
find . -name '*.md' -print0 | while IFS= read -r -d '' FILE ; do
# Extract: ```bash ... ```
sed -n "/^\`\`\`\(bash\|shell\)$/,/^\`\`\`$/p" "${FILE}" | sed '/^```*/d' >> README.sh
# Extract: ```bash ... ```
sed -n "/^ \`\`\`\(bash\|shell\)$/,/^ \`\`\`$/p" "${FILE}" | sed '/^ ```*/d; s/^ //' >> README.sh
done
chmod a+x README.sh
- name: 💡 MegaLinter
uses: oxsecurity/megalinter@7e042c726c68415475b05a65a686c612120a1232 # v7.7.0
env:
GITHUB_COMMENT_REPORTER: false
GITHUB_STATUS_REPORTER: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}