mirror of
https://github.com/icewind1991/nextcloud-version-matrix.git
synced 2026-11-29 23:40:48 +01:00
ci(workflow): Add github action to confirm dist was rebuild
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
1107e18db5
commit
b01f59622a
2 changed files with 45 additions and 0 deletions
40
.github/workflows/dist.yml
vendored
Normal file
40
.github/workflows/dist.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: Check dist is up-to-date
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check_dist:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check dist is up-to-date
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Check for changes
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain dist)" ]; then
|
||||
git status dist
|
||||
git diff dist
|
||||
echo "::error::dist is outdated, run 'npm ci && npm run build' and commit the result"
|
||||
exit 1
|
||||
fi
|
||||
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
|
@ -1,5 +1,8 @@
|
|||
name: Test the action
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
|
@ -13,6 +16,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Execute action
|
||||
id: run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue