mirror of
https://github.com/ublue-os/forge.git
synced 2025-04-08 07:53:43 +03:00
30 lines
813 B
YAML
30 lines
813 B
YAML
---
|
|
- name: Build project
|
|
hosts: host.ublue.local
|
|
gather_facts: true
|
|
pre_tasks:
|
|
- name: DEBUG - forge variables
|
|
ansible.builtin.include_role:
|
|
name: debug_forge_vars
|
|
|
|
tasks:
|
|
- name: Build and push image to registry
|
|
containers.podman.podman_image:
|
|
name: "{{ forge_git_repository_url | regex_search(__regex_search) }}"
|
|
tag: latest
|
|
path: "{{ forge_git_repository_destination }}"
|
|
build:
|
|
file: Containerfile
|
|
format: oci
|
|
pull: false
|
|
push: true
|
|
push_args:
|
|
dest: "{{ forge_registry_url }}"
|
|
vars:
|
|
__regex_search: (?<=/)[^/]+(?=\.git)
|
|
register: __podman_image_info
|
|
|
|
- name: INFO | Status from build and push
|
|
ansible.builtin.debug:
|
|
msg: "{{ __podman_image_info }}"
|