treetrail-frontend/build.yaml

50 lines
1.2 KiB
YAML
Raw Permalink Normal View History

- name: Build container image
hosts: localhost
gather_facts: false
vars:
repository: tiptop:5000
force_rm: false
cache: false
tasks:
- name: Install dependencies
command: pnpm install
args:
chdir: "{{ playbook_dir }}"
- name: Build the Angular app
command: ng build
args:
chdir: "{{ playbook_dir }}"
- name: Get the version from git
command: git describe --dirty --tags
register: version
args:
chdir: "{{ playbook_dir }}"
2024-11-09 02:32:42 +01:00
- 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 }}"
state: build
force: true
path: "{{ playbook_dir }}"
build:
format: oci
force_rm: "{{ force_rm }}"
cache: "{{ cache }}"
file: Containerfile
extra_args: "--build-arg APP_VERSION={{ version.stdout }}"
push: true
push_args:
dest: "{{ repository }}/treetrail-frontend:{{ version.stdout }}"
#quadlet_options:
# - |
# [Install]
# WantedBy=default.target