36 lines
793 B
YAML
36 lines
793 B
YAML
name: lint
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: lint-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: nix
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: run linters
|
|
run: nix run -L .#ci -- lint . "$RUNNER_TEMP/findings"
|
|
|
|
- name: report findings
|
|
if: always()
|
|
env:
|
|
REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: |
|
|
if [ "${{ github.event_name }}" = pull_request ]; then
|
|
nix run -L .#ci -- lint-report gitea-pr-review "$RUNNER_TEMP/findings"
|
|
else
|
|
nix run -L .#ci -- lint-summary "$RUNNER_TEMP/findings" \
|
|
| tee -a "$GITHUB_STEP_SUMMARY"
|
|
fi
|