pull version from .json
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 10s

This commit is contained in:
Karl 2025-07-09 11:50:35 +01:00
parent 2d0233dede
commit 34b1c0a979

View File

@ -19,21 +19,10 @@ jobs:
- name: Log in to Docker Registry
run: echo "${{ secrets.PASSWORD }}" | docker login ${{ secrets.REGISTRY }} -u "${{ secrets.USERNAME }}" --password-stdin
- name: Determine Version
- name: Determine Version from package.json
id: version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Update package.json version
run: |
VERSION="${{ steps.version.outputs.VERSION }}"
jq --arg v "$VERSION" '.version = $v' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Commit and push package.json
run: |
git config --global user.name 'Gitea Actions'
git config --global user.email 'actions@gitea.com'
git add package.json
git commit -m "ci: bump version to ${{ steps.version.outputs.VERSION }}"
git push origin HEAD:master
echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
- name: Build and Push Docker Images
run: |
IMAGE_NAME="ktvmanager-backend"