feat: faster deployment options using Gitea OCI registry
This commit is contained in:
29
playbooks/fast-build.yml
Normal file
29
playbooks/fast-build.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
- name: Make build artifact.
|
||||
hosts: localhost
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.tf.json
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Log into Docker.
|
||||
community.docker.docker_login:
|
||||
registry_url: '{{ full_domain.value }}'
|
||||
username: '{{ username }}'
|
||||
password: '{{ api_key }}'
|
||||
reauthorize: true
|
||||
|
||||
- name: Build image.
|
||||
community.docker.docker_image_build:
|
||||
name: "{{ full_domain.value }}/{{ image_name }}:latest"
|
||||
path: ../gitea
|
||||
nocache: true
|
||||
rebuild: always
|
||||
pull: true
|
||||
outputs: [{ type: image, push: true }]
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64/v8
|
||||
|
||||
- name: Log out of Docker.
|
||||
community.docker.docker_login:
|
||||
state: absent
|
||||
Reference in New Issue
Block a user