Merge pull request 'feat: use INCUS_GLOBAL_CONF value' (#33) from benvin/incus_global_config into master
All checks were successful
Deploy / deploy (push) Successful in 2m41s

Reviewed-on: #33
This commit is contained in:
Ben Vincent 2025-10-18 00:03:49 +11:00
commit ffbb91891e
3 changed files with 12 additions and 4 deletions

View File

@ -9,7 +9,7 @@ jobs:
runs-on: almalinux-8
container:
image: git.unkin.net/unkin/almalinux9-actionsdind:latest
options: --privileged
options: "--privileged --volume /etc/pki/tls/vault:/etc/pki/tls/vault:ro"
steps:
- name: Checkout code

View File

@ -11,7 +11,7 @@ jobs:
runs-on: almalinux-8
container:
image: git.unkin.net/unkin/almalinux9-actionsdind:latest
options: --privileged
options: "--privileged --volume /etc/pki/tls/vault:/etc/pki/tls/vault:ro"
steps:
- name: Checkout code

View File

@ -21,8 +21,16 @@ define vault_env
mkdir -p $$INCUS_CONFIG_DIR/servercerts && \
printf '%s\n' "$$INCUS_CONF_INCUSIMAGES_CERT" > $$INCUS_CONFIG_DIR/servercerts/incus-images.crt && \
printf '%s\n' "$$INCUS_CONF_CONFIG_YAML" > $$INCUS_CONFIG_DIR/config.yaml && \
printf '%s\n' "$$INCUS_CLIENT_CRT" > $$INCUS_CONFIG_DIR/client.crt && \
printf '%s\n' "$$INCUS_CLIENT_KEY" > $$INCUS_CONFIG_DIR/client.key
if [ -f /etc/pki/tls/vault/certificate.crt ] && [ -f /etc/pki/tls/vault/private.key ]; then \
cp /etc/pki/tls/vault/certificate.crt $$INCUS_CONFIG_DIR/client.crt && \
cp /etc/pki/tls/vault/private.key $$INCUS_CONFIG_DIR/client.key; \
elif [ -f $$HOME/.config/incus/client.crt ] && [ -f $$HOME/.config/incus/client.key ]; then \
cp $$HOME/.config/incus/client.crt $$INCUS_CONFIG_DIR/client.crt && \
cp $$HOME/.config/incus/client.key $$INCUS_CONFIG_DIR/client.key; \
else \
printf '%s\n' "$$INCUS_CLIENT_CRT" > $$INCUS_CONFIG_DIR/client.crt && \
printf '%s\n' "$$INCUS_CLIENT_KEY" > $$INCUS_CONFIG_DIR/client.key; \
fi
endef
clean: