From 266159159aee59170beeeb78a48a3172db3fea21 Mon Sep 17 00:00:00 2001 From: Julie Lundberg Suter Date: Sun, 9 Mar 2025 14:03:29 +0100 Subject: [PATCH] Fixed envsubst code --- .github/workflows/update_primary_nginx.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_primary_nginx.yml b/.github/workflows/update_primary_nginx.yml index 9733e17..dad9f75 100644 --- a/.github/workflows/update_primary_nginx.yml +++ b/.github/workflows/update_primary_nginx.yml @@ -1,4 +1,4 @@ -name: UNFINISHED - setup nginx from the configuration file +name: Setup nginx from the configuration file on: workflow_dispatch: @@ -23,6 +23,11 @@ jobs: #- name: Create temporary nginx config file # run: envsubst < ./nginx_template.txt > temp_default.conf # Maybe look at https://www.baeldung.com/linux/envsubst-command to get an idea + + # Fixed envsubst code + - name: Create temporary nginx config file + run: envsubst "$(printf '${%s} ' $(env | cut -d= -f1))" < ./nginx_template.txt > temp_default.conf + - name: Copy temporary file to correct place run: cp temp_default.conf /etc/nginx/conf.d/default.conf