44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --prefer-offline
|
|
|
|
# ci-checks.sh always exits 0: findings become issues, not failed builds.
|
|
- name: Run checks
|
|
env:
|
|
API_BASE: ${{ github.server_url }}/api/v1
|
|
REPO: ${{ github.repository }}
|
|
SHA: ${{ github.sha }}
|
|
# Prefer a PAT with issue write scope (secret: GITEA_TOKEN).
|
|
# Default GITHUB_TOKEN is usually scoped to this repo only.
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
TOKEN="${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
|
|
if [ -z "$TOKEN" ]; then
|
|
echo "No GITEA_TOKEN/GITHUB_TOKEN available to file issues"
|
|
exit 0
|
|
fi
|
|
export TOKEN
|
|
bash scripts/ci-checks.sh
|