Files
dmg b211e9d337
CI / build (pull_request) Successful in 1m16s
CI / build (push) Successful in 3m24s
feat(sentinel): alert on repeated suspicious movement
2026-10-29 08:28:27 -04:00

53 lines
1.8 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout public source without a credential
env:
SOURCE_SHA: ${{ github.sha }}
GIT_TERMINAL_PROMPT: '0'
run: |
test "${#SOURCE_SHA}" -eq 40
printf '%s' "$SOURCE_SHA" | grep -Eq '^[a-f0-9]{40}$'
git init .
git remote add origin https://git.garvis.dev/dmg/purpur-sentinel.git
git config --local credential.helper ''
git config --local http.extraHeader ''
git config --local http.followRedirects false
git fetch --force --tags origin '+refs/heads/*:refs/remotes/origin/*'
git fetch origin "$SOURCE_SHA"
git checkout --detach "$SOURCE_SHA"
- name: Set up Java
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
distribution: temurin
java-version: 25
cache: gradle
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
cache: npm
- name: Validate conventional commits
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.sha }}
run: |
npx -y -p @commitlint/cli -p @commitlint/config-conventional \
commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --extends @commitlint/config-conventional
- name: Build and test
run: ./gradlew clean check jar
- name: Upload development artifact
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: purpur-sentinel-${{ github.sha }}
path: build/libs/purpur-sentinel-*.jar
if-no-files-found: error