mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-05 16:28:17 +00:00
* chore: add prettier configuration Signed-off-by: Xe Iaso <me@xeiaso.net> * format: run prettier tree-wide Signed-off-by: Xe Iaso <me@xeiaso.net> * chore(prettier): ignore intentionally ungrammatical files Signed-off-by: Xe Iaso <me@xeiaso.net> * ci: add PR title lint rule Signed-off-by: Xe Iaso <me@xeiaso.net> * ci: add DCO check Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: add commitlint and husky Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: add CONTRIBUTING guidelines Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: set SKIP_INTEGRATION in precommit tests Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: update spelling Signed-off-by: Xe Iaso <me@xeiaso.net> * ci(dco): remove reopened trigger Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: remove dead file Signed-off-by: Xe Iaso <me@xeiaso.net> * chore(prettier): don't format nginx includes Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Asset Build Verification
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
asset_verification:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: build essential
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential
|
|
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
with:
|
|
node-version: "24.11.0"
|
|
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
|
with:
|
|
go-version: "1.25.4"
|
|
|
|
- name: install node deps
|
|
run: |
|
|
npm ci
|
|
|
|
- name: Check for uncommitted changes before asset build
|
|
id: check-changes-before
|
|
run: |
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Fail if there are uncommitted changes before build
|
|
if: steps.check-changes-before.outputs.has_changes == 'true'
|
|
run: |
|
|
echo "There are uncommitted changes before running npm run assets"
|
|
git status
|
|
exit 1
|
|
|
|
- name: Run asset build
|
|
run: |
|
|
npm run assets
|
|
|
|
- name: Check for uncommitted changes after asset build
|
|
id: check-changes-after
|
|
run: |
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Fail if assets generated changes
|
|
if: steps.check-changes-after.outputs.has_changes == 'true'
|
|
run: |
|
|
echo "npm run assets generated uncommitted changes. This indicates the repository has outdated generated files."
|
|
echo "Please run 'npm run assets' locally and commit the changes."
|
|
git status
|
|
git diff
|
|
exit 1
|