This commit is contained in:
parent
b2c5a9062e
commit
8c272ab6ff
3 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Update version.json
|
||||
command: pnpm run version
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Build frontend container
|
||||
containers.podman.podman_image:
|
||||
name: "treetrail-frontend:{{ version.stdout }}"
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test",
|
||||
"openapi-ts": "openapi-ts"
|
||||
"openapi-ts": "openapi-ts",
|
||||
"version": "echo \"{\\\"version\\\":\\\"$(git describe --tags --dirty --always)\\\"}\" > src/version.json"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue