Files
Volnei Munhoz 6ff6732136 labeler trigger
2025-11-14 07:04:03 -03:00

51 lines
1.2 KiB
YAML

name: Lint
on:
workflow_call:
env:
BUN_VERSION: 1.3.1
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run lint
id: lint
run: bun run lint
- name: Lint summary
if: always()
env:
STEP_STATUS: ${{ steps.lint.outcome }}
LOG_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
STATUS=$(echo "${STEP_STATUS}" | tr '[:lower:]' '[:upper:]')
{
echo "## Lint"
echo ""
echo "- Status: ${STATUS}"
if [ "${STEP_STATUS}" != "success" ]; then
echo "- Logs: ${LOG_URL}"
fi
} >> "$GITHUB_STEP_SUMMARY"