Add Node.js setup and build steps to workflows
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 42s
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 42s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,22 +15,33 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build TypeScript
|
||||
run: npm run build
|
||||
|
||||
- name: Build and Push to local registry
|
||||
run: |
|
||||
REGISTRY="192.168.88.201:5000"
|
||||
# Hier wird automatisch der Name des neuen Projekts eingesetzt:
|
||||
IMAGE_NAME="${{ gitea.repository }}"
|
||||
|
||||
|
||||
if [ -z "${{ github.event.inputs.tag_name }}" ]; then
|
||||
VERSION="v${{ gitea.run_number }}"
|
||||
else
|
||||
VERSION="${{ github.event.inputs.tag_name }}"
|
||||
fi
|
||||
|
||||
|
||||
FULL_IMAGE_PATH="$REGISTRY/$IMAGE_NAME"
|
||||
|
||||
docker build -t $FULL_IMAGE_PATH:latest .
|
||||
docker tag $FULL_IMAGE_PATH:latest $FULL_IMAGE_PATH:$VERSION
|
||||
|
||||
|
||||
docker push $FULL_IMAGE_PATH:latest
|
||||
docker push $FULL_IMAGE_PATH:$VERSION
|
||||
Reference in New Issue
Block a user