Compare commits
3
Commits
a8b313dd16
...
63d68f6e14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63d68f6e14 | ||
|
|
aa2a2d409b | ||
|
|
5903c18657 |
No files matched your search
@@ -1,17 +1,54 @@
|
|||||||
name: Build Docker Image - Dev
|
name: Release Development
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
schedule:
|
||||||
branches:
|
- cron: '0 23 * * *'
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.lechner-systems.at
|
REGISTRY: docker.lechner-systems.at
|
||||||
IMAGE_NAME: lechnersystems/portfolio
|
IMAGE_NAME: lechnersystems/portfolio
|
||||||
|
|
||||||
jobs:
|
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:
|
docker:
|
||||||
|
needs: changes
|
||||||
|
if: needs.changes.outputs.changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
code: read
|
code: read
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Build Docker Image - Latest
|
name: Release Production
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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
|
||||||
Reference in new issue
Block a user