This commit is contained in:
parent
b2c5a9062e
commit
8c272ab6ff
3 changed files with 15 additions and 3 deletions
|
@ -4,7 +4,7 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
build:
|
build:
|
||||||
description: "Build container"
|
description: "Build container"
|
||||||
required: false
|
required: true
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Update version.json from git describe
|
||||||
|
run: pnpm run version
|
||||||
|
|
||||||
- name: Build package (transpile ts => js)
|
- name: Build package (transpile ts => js)
|
||||||
run: ng build
|
run: ng build
|
||||||
|
|
||||||
|
@ -63,6 +66,8 @@ jobs:
|
||||||
tags: ${{ steps.version.outputs.version }}
|
tags: ${{ steps.version.outputs.version }}
|
||||||
containerfiles: |
|
containerfiles: |
|
||||||
./Containerfile
|
./Containerfile
|
||||||
|
build-args: |
|
||||||
|
APP_VERSION=${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
- name: Workaround for bug of podman-login
|
- name: Workaround for bug of podman-login
|
||||||
if: fromJSON(steps.builder.outputs.run)
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
|
@ -79,8 +84,9 @@ jobs:
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
auth_file_path: /tmp/auth.json
|
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)
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
|
uses: actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
registry: "docker://${{ vars.REGISTRY }}"
|
registry: "docker://${{ vars.REGISTRY }}"
|
||||||
image: treetrail-frontend
|
image: treetrail-frontend
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
args:
|
args:
|
||||||
chdir: "{{ playbook_dir }}"
|
chdir: "{{ playbook_dir }}"
|
||||||
|
|
||||||
|
- name: Update version.json
|
||||||
|
command: pnpm run version
|
||||||
|
args:
|
||||||
|
chdir: "{{ playbook_dir }}"
|
||||||
|
|
||||||
- name: Build frontend container
|
- name: Build frontend container
|
||||||
containers.podman.podman_image:
|
containers.podman.podman_image:
|
||||||
name: "treetrail-frontend:{{ version.stdout }}"
|
name: "treetrail-frontend:{{ version.stdout }}"
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"openapi-ts": "openapi-ts"
|
"openapi-ts": "openapi-ts",
|
||||||
|
"version": "echo \"{\\\"version\\\":\\\"$(git describe --tags --dirty --always)\\\"}\" > src/version.json"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue