Compare commits

...
3 Commits
Author SHA1 Message Date
fraujulian 63d68f6e14 ci: gate scheduled development releases on changes
CI / tests (push) Failing after 5m57s
CI / lint (push) Canceled after 7m41s
CI / formatting (push) Canceled after 7m27s
CI / metadata (push) Canceled after 7m25s
2026-10-02 11:52:49 +02:00
fraujulian aa2a2d409b ci: rename production release workflow 2026-10-02 11:52:13 +02:00
fraujulian 5903c18657 ci: split Gitea validation into parallel jobs 2026-10-02 11:52:03 +02:00
4 changed files with 108 additions and 40 deletions

No files matched your search

+41 -4
View File
@@ -1,17 +1,54 @@
name: Build Docker Image - Dev
name: Release Development
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 23 * * *'
env:
REGISTRY: docker.lechner-systems.at
IMAGE_NAME: lechnersystems/portfolio
jobs:
changes:
runs-on: ubuntu-latest
permissions:
code: read
outputs:
changed: ${{ steps.changes.outputs.changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check changes since previous development release
id: changes
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
API_URL: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/workflows/BuildDev.yml/runs
run: |
runs="$(curl --fail-with-body --silent --show-error \
--header "Authorization: token ${GITEA_TOKEN}" \
"${API_URL}?branch=main&limit=50")"
previous_sha="$(printf '%s' "$runs" | jq -r \
--argjson current_run "$GITEA_RUN_ID" \
'[.workflow_runs[] | select(.id != $current_run and .status == "success" and (.event == "schedule" or .event == "workflow_dispatch"))][0].head_sha // empty')"
if [ -z "$previous_sha" ]; then
echo 'changed=true' >> "$GITHUB_OUTPUT"
else
git cat-file -e "${previous_sha}^{commit}"
if git diff --quiet "$previous_sha" "$GITEA_SHA"; then
echo 'changed=false' >> "$GITHUB_OUTPUT"
echo 'No changes since the previous successful development release.'
else
echo 'changed=true' >> "$GITHUB_OUTPUT"
fi
fi
docker:
needs: changes
if: needs.changes.outputs.changed == 'true'
runs-on: ubuntu-latest
permissions:
code: read
+1 -1
View File
@@ -1,4 +1,4 @@
name: Build Docker Image - Latest
name: Release Production
on:
workflow_dispatch:
-35
View File
@@ -1,35 +0,0 @@
name: Build Validation
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
permissions:
code: read
steps:
- name: checkout Repository
uses: actions/checkout@v4
- name: use NodeJS v24.14.0
uses: actions/setup-node@v4
with:
node-version: '24.14.0'
- name: install Dependencies
run: npm install
- name: run Build Validation
run: npm run check
- name: run Tests
run: npm run test
env:
CHROME_BIN: google-chrome
+66
View File
@@ -0,0 +1,66 @@
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
code: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: npm
- run: npm ci
- run: npm run lint
formatting:
runs-on: ubuntu-latest
permissions:
code: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: npm
- run: npm ci
- run: npm run format:check
metadata:
runs-on: ubuntu-latest
permissions:
code: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: npm
- run: npm ci
- run: npm run version:check
- run: npm run text:check
tests:
runs-on: ubuntu-latest
permissions:
code: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.14.0'
cache: npm
- run: npm ci
- name: Run tests
run: npm run test
env:
CHROME_BIN: google-chrome