Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/super-linter.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FIX_MARKDOWN=true
IGNORE_GITIGNORED_FILES=true
MARKDOWN_CONFIG_FILE=.markdownlint.yml
VALIDATE_ALL_CODEBASE=false
VALIDATE_GIT_MERGE_CONFLICT_MARKERS=true
VALIDATE_GITHUB_ACTIONS=true
VALIDATE_JSON=true
VALIDATE_MARKDOWN=true
VALIDATE_YAML=true
1 change: 1 addition & 0 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
permissions:
contents: read
statuses: write
pull-requests: write

jobs:
testing:
Expand Down
54 changes: 39 additions & 15 deletions .github/workflows/validate-pr_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,50 @@ name: Reusable workflow to validate a pull request

on: workflow_call

permissions:
contents: read
statuses: write

jobs:
lint-test:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Load super-linter configuration
run: cat .github/super-linter.env >> "$GITHUB_ENV"

- name: Lint Code Base
uses: super-linter/super-linter/slim@v7.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup reviewdog
uses: reviewdog/action-setup@v1.3.0
with:
reviewdog_version: v0.20.3

- name: Load super-linter configuration
shell: bash
run: cat .github/super-linter.env >> "$GITHUB_ENV"

- name: Lint Code Base with super-linter and reviewdog
uses: super-linter/super-linter/slim@v7.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Report linting results with reviewdog
shell: bash
run: |
TMPFILE=$(mktemp)
git diff > "${TMPFILE}"
if [ ! -s "${TMPFILE}" ]; then
echo "No changes detected, skipping reviewdog."
exit 0
fi
git stash --include-untracked
reviewdog \
-f=diff \
-f.diff.strip=1 \
-name="markdownlint-fix" \
-reporter="github-pr-review" \
-filter-mode="diff_context" \
-fail-level=error < "${TMPFILE}"
git stash drop || true
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

remark-test:
runs-on: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ local-test.yml
.yalc
yalc.lock

tmp/
tmp/

# Super-linter outputs
super-linter-output
super-linter.log

# GitHub Actions leftovers
github_conf