CI: add app version

This commit is contained in:
phil 2024-11-09 02:32:42 +01:00
parent b2c5a9062e
commit 8c272ab6ff
3 changed files with 15 additions and 3 deletions

View file

@ -4,7 +4,7 @@ on:
inputs:
build:
description: "Build container"
required: false
required: true
default: false
type: boolean
@ -50,6 +50,9 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Update version.json from git describe
run: pnpm run version
- name: Build package (transpile ts => js)
run: ng build
@ -63,6 +66,8 @@ jobs:
tags: ${{ steps.version.outputs.version }}
containerfiles: |
./Containerfile
build-args: |
APP_VERSION=${{ steps.version.outputs.version }}
- name: Workaround for bug of podman-login
if: fromJSON(steps.builder.outputs.run)
@ -79,8 +84,9 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }}
auth_file_path: /tmp/auth.json
- uses: actions/push-to-registry@v2
- name: Push the image to the registry
if: fromJSON(steps.builder.outputs.run)
uses: actions/push-to-registry@v2
with:
registry: "docker://${{ vars.REGISTRY }}"
image: treetrail-frontend