Adds scripts/bark-notify.sh (deployment detail, hardcoded device_key + endpoint — per the script header it's a deployment constant, not a secret) and a final workflow step that pushes a ✅/❌ notification on every job result. The notify step: - runs unconditionally (if: always()) so failures also notify - is a side-effect — if Bark itself is unreachable, the curl failure is swallowed so CI does not turn red on a notification outage - uses portable context vars (github.repository / ref_name / sha / actor / job.status) which work on Gitea Actions Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
|
|
jobs:
|
|
ci:
|
|
name: CI
|
|
# `astral-uv` is a self-hosted runner with uv pre-installed, so we can
|
|
# skip the setup-uv step entirely. pyproject.toml's
|
|
# [tool.hatch.build.hooks.jupyter-builder] handles jlpm install +
|
|
# jlpm build:prod before wheel assembly.
|
|
runs-on: astral-uv
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build package
|
|
run: uv build
|
|
|
|
- name: Upload wheel artifacts
|
|
if: success()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: snapshot-dist
|
|
path: dist/snapshot-*
|
|
if-no-files-found: error
|
|
|
|
# Always run, regardless of job status. The script is a side-effect;
|
|
# if the notification itself fails we swallow the error so CI does
|
|
# not turn red on a Bark outage.
|
|
- name: Notify Bark
|
|
if: always()
|
|
run: |
|
|
if [ "${{ job.status }}" = "success" ]; then
|
|
TITLE="✅ CI: ${{ github.repository }}@${{ github.ref_name }}"
|
|
BODY="Build OK for ${{ github.sha }} by ${{ github.actor }}"
|
|
else
|
|
TITLE="❌ CI: ${{ github.repository }}@${{ github.ref_name }}"
|
|
BODY="Build FAILED for ${{ github.sha }} by ${{ github.actor }}"
|
|
fi
|
|
./scripts/bark-notify.sh "$TITLE" "$BODY" || echo "Bark notify failed (non-fatal)"
|