provide PACKAGES_TOKEN secret
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
- name: Deploy Gitea Action
|
||||
hosts: raspberries:&local:!gitea # do not deploy on machine with gitea instance
|
||||
|
||||
roles:
|
||||
- arcodange.factory.gitea_token # generate gitea_api_token used to replace generated token with set name if required
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Fetch Gitea Token for Action Runner registration
|
||||
@@ -39,9 +42,9 @@
|
||||
# You don't have to copy this file to your instance,
|
||||
# just run `./act_runner generate-config > config.yaml` to generate a config file.
|
||||
|
||||
log:
|
||||
# The level of logging, can be trace, debug, info, warn, error, fatal
|
||||
level: info
|
||||
#log:
|
||||
# # The level of logging, can be trace, debug, info, warn, error, fatal
|
||||
# level: info
|
||||
|
||||
runner:
|
||||
# Where to store the registration result.
|
||||
@@ -132,13 +135,35 @@
|
||||
# The parent directory of a job's working directory.
|
||||
# If it's empty, $HOME/.cache/act/ will be used.
|
||||
workdir_parent:
|
||||
- name: Deploy Gitea with Docker Compose
|
||||
- name: Deploy Gitea Action with Docker Compose
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "/home/pi/arcodange/docker_composes/arcodange_factory_gitea_action"
|
||||
pull: missing
|
||||
state: present
|
||||
register: deploy_result
|
||||
|
||||
- name: Set PACKAGES_TOKEN secret to upload packages from CI
|
||||
run_once: True
|
||||
block:
|
||||
- name: Generate cicd PACKAGES_TOKEN
|
||||
include_role:
|
||||
name: arcodange.factory.gitea_token
|
||||
vars:
|
||||
gitea_token_name: PACKAGES_TOKEN
|
||||
gitea_token_fact_name: cicd_PACKAGES_TOKEN
|
||||
gitea_token_scopes: write:package
|
||||
gitea_token_replace: true
|
||||
|
||||
- name: Register cicd PACKAGES_TOKEN secrets
|
||||
include_role:
|
||||
name: arcodange.factory.gitea_secret
|
||||
vars:
|
||||
gitea_secret_name: PACKAGES_TOKEN
|
||||
gitea_secret_value: "{{ cicd_PACKAGES_TOKEN }}"
|
||||
loop: ["organization", "user"]
|
||||
loop_control:
|
||||
loop_var: gitea_owner_type # Peut être "user" ou "organization"
|
||||
|
||||
- name: Deploy Argo CD
|
||||
run_once: true
|
||||
block:
|
||||
@@ -150,3 +175,9 @@
|
||||
- name: Sync other repos
|
||||
include_role:
|
||||
name: arcodange.factory.gitea_sync
|
||||
|
||||
post_tasks:
|
||||
- include_role:
|
||||
name: arcodange.factory.gitea_token
|
||||
vars:
|
||||
gitea_token_delete: true
|
||||
Reference in New Issue
Block a user