-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gha): unify GHA - renovate, megalinter, markdown, ...
- Loading branch information
Showing
30 changed files
with
358 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
skip-check: | ||
# Ensure that HEALTHCHECK instructions have been added to container images | ||
- CKV_DOCKER_2 | ||
# Ensure that a user for the container has been created | ||
- CKV_DOCKER_3 | ||
# 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 | ||
- CKV_GHA_7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 7 additions & 5 deletions
12
.github/workflows/markdown.yml → .github/workflows/markdown-check.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: readme-commands-check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- README.md | ||
- .github/workflows/readme-commands-check.yml | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- README.md | ||
- .github/workflows/readme-commands-check.yml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
readme-commands-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Run commands in README.md file | ||
run: sed -n "/^\`\`\`bash.*/,/^\`\`\`$/p" README.md | sed "/^\`\`\`*/d" | bash -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.