From 3c8fd06967eaf97b97964ebf312493c5b930ace0 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 13 Feb 2024 23:37:58 -0700 Subject: [PATCH 01/40] [FEATURE] Infisical Env Action --- action.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..4a950bf --- /dev/null +++ b/action.yml @@ -0,0 +1,32 @@ +# Based on https://github.com/zerodays/action-infisical/blob/master/action.yml +name: 'Elysium Infisical Secrets' +description: 'Fetch secrets from Infisical and add them to the env' +inputs: + infisical-token: + description: 'Infisical API Token' + required: true + workspace-id: + description: 'Infisical Workspace ID' + required: true + environment: + description: 'The environment to fetch secrets for (e.g., staging, production)' + required: true + secret-path: + description: 'Secret path (defaults to /)' + required: false + default: '/' + api-url: + description: 'Infisical API URL (defaults to https://infisical.dunemask.dev)' + required: false + default: 'https://infisical.dunemask.dev' +runs: + using: 'composite' + steps: + - name: Fetch secrets from Infisical and add them to the environment + shell: bash + run: | + curl "${{ inputs.api-url }}/api/v3/secrets/raw?environment=${{ inputs.environment }}&secretPath=${{ inputs.secret-path }}&workspaceId=${{ inputs.workspace-id }}" \ + --header "Authorization: Bearer ${{ inputs.infisical-token }}" \ + | jq -r '.secrets[] | "\(.secretKey)=\(.secretValue)"' > $GITHUB_ENV + - shell: bash + run: echo "Secrets added to environment!". \ No newline at end of file From 6ecc42fde5ff142357089770669df964925f5867 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 00:17:25 -0700 Subject: [PATCH 02/40] [TEST] Initial switch to elysium-actions --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 4a950bf..f7d0566 100644 --- a/action.yml +++ b/action.yml @@ -22,11 +22,15 @@ inputs: runs: using: 'composite' steps: + - name: Install JQ + shell: bash + run: | + curl https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 >> ./jq - name: Fetch secrets from Infisical and add them to the environment shell: bash run: | curl "${{ inputs.api-url }}/api/v3/secrets/raw?environment=${{ inputs.environment }}&secretPath=${{ inputs.secret-path }}&workspaceId=${{ inputs.workspace-id }}" \ --header "Authorization: Bearer ${{ inputs.infisical-token }}" \ - | jq -r '.secrets[] | "\(.secretKey)=\(.secretValue)"' > $GITHUB_ENV + | ./jq -r '.secrets[] | "\(.secretKey)=\(.secretValue)"' > $GITHUB_ENV - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From 7c1632caaf60fc9fa6dcd7f9a035a8935a26e4df Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 16:44:28 -0700 Subject: [PATCH 03/40] [FEATURE] Test Infisical Install --- action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action.yml b/action.yml index f7d0566..d04778d 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,11 @@ inputs: runs: using: 'composite' steps: + - name: Infisical CLI install + shell: bash + run: | + curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_armv6.tar.gz | tar xvz + ./infisical - name: Install JQ shell: bash run: | From ff0aeadca67baeb33808f59cbb576a23760b589d Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 16:47:02 -0700 Subject: [PATCH 04/40] [FEATURE] Fixed Platform --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d04778d..304320b 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,7 @@ runs: - name: Infisical CLI install shell: bash run: | - curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_armv6.tar.gz | tar xvz + curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz ./infisical - name: Install JQ shell: bash From d3da0bda3bf0397a4143737cd75c1375ad6b4b3c Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 19:50:41 -0700 Subject: [PATCH 05/40] [FEATURE] Infisical Tool Rewrite --- action.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/action.yml b/action.yml index 304320b..c081500 100644 --- a/action.yml +++ b/action.yml @@ -5,20 +5,16 @@ inputs: infisical-token: description: 'Infisical API Token' required: true - workspace-id: - description: 'Infisical Workspace ID' - required: true environment: description: 'The environment to fetch secrets for (e.g., staging, production)' required: true secret-path: description: 'Secret path (defaults to /)' - required: false - default: '/' + required: true api-url: - description: 'Infisical API URL (defaults to https://infisical.dunemask.dev)' + description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' required: false - default: 'https://infisical.dunemask.dev' + default: 'https://infisical.dunemask.dev/api' runs: using: 'composite' steps: @@ -26,16 +22,6 @@ runs: shell: bash run: | curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - ./infisical - - name: Install JQ - shell: bash - run: | - curl https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 >> ./jq - - name: Fetch secrets from Infisical and add them to the environment - shell: bash - run: | - curl "${{ inputs.api-url }}/api/v3/secrets/raw?environment=${{ inputs.environment }}&secretPath=${{ inputs.secret-path }}&workspaceId=${{ inputs.workspace-id }}" \ - --header "Authorization: Bearer ${{ inputs.infisical-token }}" \ - | ./jq -r '.secrets[] | "\(.secretKey)=\(.secretValue)"' > $GITHUB_ENV + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} > $GITHUB_ENV - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From fc823beac6f0a7537fcd32e1c058b8942e4b00ab Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 19:52:17 -0700 Subject: [PATCH 06/40] [FEATURE] Infisical Tool Rewrite --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c081500..e6b8644 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,7 @@ inputs: description: 'The environment to fetch secrets for (e.g., staging, production)' required: true secret-path: - description: 'Secret path (defaults to /)' + description: 'Secret path' required: true api-url: description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' From 4a9785db44c116bfa96ff78514ad51b806ccc7a2 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Wed, 14 Feb 2024 20:02:38 -0700 Subject: [PATCH 07/40] [FEATURE] Updtae env save --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e6b8644..5232e43 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,6 @@ runs: shell: bash run: | curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} > $GITHUB_ENV + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} >> $GITHUB_ENV - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From fb438ca8ddf8d8e9563720e72057813fbddf2da8 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 16:18:13 -0700 Subject: [PATCH 08/40] [FEATURE] Auto Oasis Test --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 5232e43..b5f904c 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,7 @@ runs: shell: bash run: | curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz + echo "Running ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }}" ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} >> $GITHUB_ENV - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From 32b42eba9feabf37d43bc3d905eace9add407c01 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 16:20:07 -0700 Subject: [PATCH 09/40] [FEATURE] Auto Oasis Test --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index b5f904c..5232e43 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,6 @@ runs: shell: bash run: | curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - echo "Running ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }}" ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} >> $GITHUB_ENV - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From c0af6e77b2b9a178084209e69bc60ce7deb00cee Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 17:42:49 -0700 Subject: [PATCH 10/40] [FEATURE] Auto Oasis Test --- action.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 5232e43..31b2fbd 100644 --- a/action.yml +++ b/action.yml @@ -5,11 +5,11 @@ inputs: infisical-token: description: 'Infisical API Token' required: true - environment: - description: 'The environment to fetch secrets for (e.g., staging, production)' + envs: + description: 'The environments to fetch secrets for (Example: ci or ci,prod,edge )' required: true - secret-path: - description: 'Secret path' + secret-paths: + description: 'Secret paths for the secrets (Must match the order of envs! Example: /main or /main,/alt-main)' required: true api-url: description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' @@ -21,7 +21,31 @@ runs: - name: Infisical CLI install shell: bash run: | + # Install Infisical Binary curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} >> $GITHUB_ENV + + # Get paths and envs into list + paths="${{ inputs.secret-paths }}" + envs="${{ inputs.envs }}" + + path_list=( $(echo $paths | sed "s/,/ /g") ) + env_list=( $(echo $envs | sed "s/,/ /g") ) + path_len=${#path_list[@]} + env_len=${#env_list[@]} + + # Ensure lengths match + if [ $path_len != $env_len ]; + then + echo "Input must match the output!" + exit 1; + fi + + # For each environment + for i in "${!path_list[@]}"; + do + echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; + done + - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From e77c10a17bbbed610aba3f90970d789938735608 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 17:51:14 -0700 Subject: [PATCH 11/40] [FEATURE] Auto Oasis Test --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 31b2fbd..bcea22d 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,7 @@ inputs: infisical-token: description: 'Infisical API Token' required: true - envs: + secret-envs: description: 'The environments to fetch secrets for (Example: ci or ci,prod,edge )' required: true secret-paths: @@ -26,7 +26,7 @@ runs: # Get paths and envs into list paths="${{ inputs.secret-paths }}" - envs="${{ inputs.envs }}" + envs="${{ inputs.secret-envs }}" path_list=( $(echo $paths | sed "s/,/ /g") ) env_list=( $(echo $envs | sed "s/,/ /g") ) From 53ffe7cfe978261f9afd2a654755f2166771636e Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 17:59:32 -0700 Subject: [PATCH 12/40] [FEATURE] Auto Oasis Test --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index bcea22d..05e88a0 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ runs: env_len=${#env_list[@]} # Ensure lengths match - if [ $path_len != $env_len ]; + if [ "$path_len" != "$env_len" ]; then echo "Input must match the output!" exit 1; From ee47f45ec9b421fcf396a308805d1fa1346d20eb Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:01:45 -0700 Subject: [PATCH 13/40] [FEATURE] Auto Oasis Test --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 05e88a0..f517c10 100644 --- a/action.yml +++ b/action.yml @@ -34,11 +34,11 @@ runs: env_len=${#env_list[@]} # Ensure lengths match - if [ "$path_len" != "$env_len" ]; - then - echo "Input must match the output!" - exit 1; - fi + # if [ "$path_len" != "$env_len" ]; + # then + # echo "Input must match the output!" + # exit 1; + # fi # For each environment for i in "${!path_list[@]}"; From 41772954b59a6bfeb5b8807b41d507549f1f5769 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:02:30 -0700 Subject: [PATCH 14/40] [FEATURE] Auto Oasis Test --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index f517c10..65332f9 100644 --- a/action.yml +++ b/action.yml @@ -41,11 +41,11 @@ runs: # fi # For each environment - for i in "${!path_list[@]}"; - do - echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; - done + # for i in "${!path_list[@]}"; + # do + # echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" + # ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; + # done - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From 4f8f4de8299843330414c232204f83975b17f190 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:02:58 -0700 Subject: [PATCH 15/40] [FEATURE] Auto Oasis Test --- action.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index 65332f9..05e88a0 100644 --- a/action.yml +++ b/action.yml @@ -34,18 +34,18 @@ runs: env_len=${#env_list[@]} # Ensure lengths match - # if [ "$path_len" != "$env_len" ]; - # then - # echo "Input must match the output!" - # exit 1; - # fi + if [ "$path_len" != "$env_len" ]; + then + echo "Input must match the output!" + exit 1; + fi # For each environment - # for i in "${!path_list[@]}"; - # do - # echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - # ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; - # done + for i in "${!path_list[@]}"; + do + echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; + done - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From a371dec5d3b998b73bd819f26d1419645453cf83 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:04:03 -0700 Subject: [PATCH 16/40] [FEATURE] Auto Oasis Test --- action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 05e88a0..f39a850 100644 --- a/action.yml +++ b/action.yml @@ -25,21 +25,26 @@ runs: curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz # Get paths and envs into list + + echo "Barely here" paths="${{ inputs.secret-paths }}" envs="${{ inputs.secret-envs }}" + echo "Got splt" + path_list=( $(echo $paths | sed "s/,/ /g") ) env_list=( $(echo $envs | sed "s/,/ /g") ) path_len=${#path_list[@]} env_len=${#env_list[@]} + echo "Got B4" # Ensure lengths match if [ "$path_len" != "$env_len" ]; then echo "Input must match the output!" exit 1; fi - + echo "Got here" # For each environment for i in "${!path_list[@]}"; do From 50ef23910940fa07fa95d5c62e172fb81673ae9c Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:14:40 -0700 Subject: [PATCH 17/40] [FEATURE] Auto Oasis Test --- action.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index f39a850..6807a57 100644 --- a/action.yml +++ b/action.yml @@ -25,30 +25,24 @@ runs: curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz # Get paths and envs into list - - echo "Barely here" paths="${{ inputs.secret-paths }}" envs="${{ inputs.secret-envs }}" - echo "Got splt" - path_list=( $(echo $paths | sed "s/,/ /g") ) env_list=( $(echo $envs | sed "s/,/ /g") ) path_len=${#path_list[@]} env_len=${#env_list[@]} - echo "Got B4" - # Ensure lengths match + # Ensure lengths match if [ "$path_len" != "$env_len" ]; then echo "Input must match the output!" exit 1; fi - echo "Got here" + # For each environment for i in "${!path_list[@]}"; - do - echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" + do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; done From d1f7d84304d6f79a3911496ae11673eb4ee47a97 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 18:26:07 -0700 Subject: [PATCH 18/40] [FEATURE] Infisical Secrets --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 6807a57..6bcd856 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,3 @@ -# Based on https://github.com/zerodays/action-infisical/blob/master/action.yml name: 'Elysium Infisical Secrets' description: 'Fetch secrets from Infisical and add them to the env' inputs: From 068503bed59283bbe71a971645cab14126bc0ab7 Mon Sep 17 00:00:00 2001 From: dunemask Date: Thu, 15 Feb 2024 04:48:52 +0000 Subject: [PATCH 19/40] [FEATURE] Adjust URLS --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4fd7c2..0e57a58 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ The actions are used by Elysium to run CI/CD tasks and this repo will be archive The actions available are: - [S3 Backup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/s3-backup/action.yml) -- [Oasis Deploy](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-deploy/action.yml) +- [Oasis Auto Setup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-setup-auto/action.yml) - [Infisical Env](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/infisical-env/action.yml) +- [Oasis Advanced Setup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-setup-advanced/action.yml) - [Elysium CI/CD](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/elysium-ci-cd/action.yml) ## Workflow Template From c7befd3e3d38ff51fa35cad45525652df8230a61 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 17 Feb 2024 00:29:19 -0700 Subject: [PATCH 20/40] [HOTFIX] Envar adjust --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 6bcd856..60c8783 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,7 @@ runs: run: | # Install Infisical Binary curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - + curl -s -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 >> yq # Get paths and envs into list paths="${{ inputs.secret-paths }}" envs="${{ inputs.secret-envs }}" @@ -42,7 +42,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" >> $GITHUB_ENV; + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | ./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV; done - shell: bash From 0d01e5b5117fa96c06f416cf98cb9375bfdea410 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 17 Feb 2024 00:32:19 -0700 Subject: [PATCH 21/40] [HOTFIX] Envar Fetch Adjust --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 60c8783..2e8e229 100644 --- a/action.yml +++ b/action.yml @@ -21,8 +21,14 @@ runs: shell: bash run: | # Install Infisical Binary - curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz + echo "Installing Infisical!" + curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - infisical + + # Install yq + echo "Installing yq" curl -s -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 >> yq + chmod +x yq + # Get paths and envs into list paths="${{ inputs.secret-paths }}" envs="${{ inputs.secret-envs }}" From 1d43d3ed6c650fa089cb0e4481e8fed32609572e Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 17 Feb 2024 00:33:24 -0700 Subject: [PATCH 22/40] [HOTFIX] Envar Fetch Adjust --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2e8e229..0fe2d3f 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,7 @@ runs: run: | # Install Infisical Binary echo "Installing Infisical!" - curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz - infisical + curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvzf - infisical # Install yq echo "Installing yq" From 83b09537fc31b4c42ad8f22ec5c531ab7848d4a5 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:13:15 -0700 Subject: [PATCH 23/40] [HOTFIX] Workflow Overhaul --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0fe2d3f..2c9a7ce 100644 --- a/action.yml +++ b/action.yml @@ -48,7 +48,10 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | ./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV; + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; + chmod +x mask.sh + ./mask.sh + rm mask.sh done - shell: bash From 54f15e6bd5dbeb8f9e824fa74204d7c7ce7c27bd Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:14:06 -0700 Subject: [PATCH 24/40] [HOTFIX] Workflow Overhaul --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2c9a7ce..8375efb 100644 --- a/action.yml +++ b/action.yml @@ -48,7 +48,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; chmod +x mask.sh ./mask.sh rm mask.sh From 7b8cad752d38882ff650bf2611c156bfe1214ce6 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:15:06 -0700 Subject: [PATCH 25/40] [HOTFIX] Workflow Overhaul --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 8375efb..05fab07 100644 --- a/action.yml +++ b/action.yml @@ -53,6 +53,7 @@ runs: ./mask.sh rm mask.sh done + env - shell: bash run: echo "Secrets added to environment!". \ No newline at end of file From 47f82efb1901243b7a50cfd24e2d2fa73cfe219f Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:17:07 -0700 Subject: [PATCH 26/40] [HOTFIX] Workflow Overhaul --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 05fab07..cb5037e 100644 --- a/action.yml +++ b/action.yml @@ -51,6 +51,7 @@ runs: ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; chmod +x mask.sh ./mask.sh + cat ./mask.sh rm mask.sh done env From 4334357d8a226407d0916cae4a46da92a7883428 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:19:30 -0700 Subject: [PATCH 27/40] [HOTFIX] Workflow Overhaul --- action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/action.yml b/action.yml index cb5037e..33702f0 100644 --- a/action.yml +++ b/action.yml @@ -51,10 +51,7 @@ runs: ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; chmod +x mask.sh ./mask.sh - cat ./mask.sh rm mask.sh done - env - - shell: bash - run: echo "Secrets added to environment!". \ No newline at end of file + run: echo "Secrets added to environment!" && env \ No newline at end of file From 1ef60cb33ec5d5e450837796e43a88b5899c96e2 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Tue, 20 Feb 2024 03:22:04 -0700 Subject: [PATCH 28/40] [HOTFIX] Workflow Overhaul --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 33702f0..9a4e338 100644 --- a/action.yml +++ b/action.yml @@ -54,4 +54,4 @@ runs: rm mask.sh done - shell: bash - run: echo "Secrets added to environment!" && env \ No newline at end of file + run: echo "Secrets added to environment!" \ No newline at end of file From c68bdd608e293f9abe4b6ff38ef31076f4b3e071 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 17:41:11 -0600 Subject: [PATCH 29/40] [CHORE] Tweak Action Version --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 9a4e338..75eef05 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,7 @@ runs: run: | # Install Infisical Binary echo "Installing Infisical!" - curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvzf - infisical + curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.28.5/infisical_0.28.5_linux_amd64.tar.gz | tar xvzf - infisical # Install yq echo "Installing yq" @@ -48,7 +48,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; + ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; chmod +x mask.sh ./mask.sh rm mask.sh From 83fa63b9747c055b26d898eacc1694af00d55a86 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 17:56:41 -0600 Subject: [PATCH 30/40] [CHORE] Tweak Action Inputs --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 75eef05..dbf8894 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' required: false default: 'https://infisical.dunemask.dev/api' + project-id: + description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' + required: false + default: ${{ vars.INFISICAL_SECRETS_PROJECT_ID }} runs: using: 'composite' steps: @@ -48,7 +52,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; chmod +x mask.sh ./mask.sh rm mask.sh From 11fe49dd2a0d007d940dab82a323f185b117fb56 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:05:35 -0600 Subject: [PATCH 31/40] [CHORE] Tweak Action Inputs --- action.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/action.yml b/action.yml index dbf8894..2b7e990 100644 --- a/action.yml +++ b/action.yml @@ -1,25 +1,24 @@ -name: 'Elysium Infisical Secrets' -description: 'Fetch secrets from Infisical and add them to the env' +name: "Elysium Infisical Secrets" +description: "Fetch secrets from Infisical and add them to the env" inputs: infisical-token: - description: 'Infisical API Token' + description: "Infisical API Token" required: true secret-envs: - description: 'The environments to fetch secrets for (Example: ci or ci,prod,edge )' + description: "The environments to fetch secrets for (Example: ci or ci,prod,edge )" required: true secret-paths: - description: 'Secret paths for the secrets (Must match the order of envs! Example: /main or /main,/alt-main)' + description: "Secret paths for the secrets (Must match the order of envs! Example: /main or /main,/alt-main)" + required: true + project-id: + description: "Infisical Secrets Project" required: true api-url: - description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' + description: "Infisical API URL (defaults to https://infisical.dunemask.dev/api)" required: false - default: 'https://infisical.dunemask.dev/api' - project-id: - description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)' - required: false - default: ${{ vars.INFISICAL_SECRETS_PROJECT_ID }} + default: "https://infisical.dunemask.dev/api" runs: - using: 'composite' + using: "composite" steps: - name: Infisical CLI install shell: bash @@ -27,7 +26,7 @@ runs: # Install Infisical Binary echo "Installing Infisical!" curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.28.5/infisical_0.28.5_linux_amd64.tar.gz | tar xvzf - infisical - + # Install yq echo "Installing yq" curl -s -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 >> yq @@ -58,4 +57,4 @@ runs: rm mask.sh done - shell: bash - run: echo "Secrets added to environment!" \ No newline at end of file + run: echo "Secrets added to environment!" From aefb84fb1b96020b13008ae898638142dc1cf066 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:49:05 -0600 Subject: [PATCH 32/40] [CHORE] Tweak Secret Usage --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2b7e990..69ad512 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh; + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key; chmod +x mask.sh ./mask.sh rm mask.sh From c6543005037bbecf1e96a9b24d6b9453763fc630 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:49:46 -0600 Subject: [PATCH 33/40] [CHORE] Tweak Secret Usage --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 69ad512..fb100f4 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key; + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key;'' chmod +x mask.sh ./mask.sh rm mask.sh From e80855f9261bdb0389b61c361835d9b50d6061ca Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:50:19 -0600 Subject: [PATCH 34/40] [CHORE] Tweak Secret Usage --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index fb100f4..abf0755 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key;'' + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key;' chmod +x mask.sh ./mask.sh rm mask.sh From b43d358049f0196f8251bfad04a73a009462768b Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:53:09 -0600 Subject: [PATCH 35/40] [CHORE] Tweak Secret Usage --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index abf0755..6fb1517 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'to_entries[] | echo .key;' + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'keys | .[]' chmod +x mask.sh ./mask.sh rm mask.sh From a3c0631d4e833078446f7bc1a885b9ae6fae26d0 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:54:04 -0600 Subject: [PATCH 36/40] [CHORE] Tweak Secret Usage --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 6fb1517..3ae0e39 100644 --- a/action.yml +++ b/action.yml @@ -51,10 +51,10 @@ runs: # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" - ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh | ./yq -r 'keys | .[]' + ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token ${{ inputs.infisical-token }} --env "${env_list[i]}" --path "${path_list[i]}" --format yaml | tee >(./yq -r 'to_entries[] | .key + "=" +.value' >> $GITHUB_ENV) | ./yq -r 'to_entries[] | "echo ::add-mask::\"" + .value + "\""' >> mask.sh chmod +x mask.sh ./mask.sh rm mask.sh done - shell: bash - run: echo "Secrets added to environment!" + run: echo "Secrets added to environment!" && env From b9a859a5646b20ca773ccbfe263bb0b2cdbb9634 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sat, 24 Aug 2024 20:59:11 -0600 Subject: [PATCH 37/40] [CHORE] Tweak Secret Usage --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3ae0e39..15a2f07 100644 --- a/action.yml +++ b/action.yml @@ -57,4 +57,4 @@ runs: rm mask.sh done - shell: bash - run: echo "Secrets added to environment!" && env + run: echo "Secrets added to environment!" From 3974280be1b0776a6f559edd6595d3f2b687d1c5 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sun, 25 Aug 2024 11:21:28 -0600 Subject: [PATCH 38/40] [CHORE] Adjust Action Logging --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 15a2f07..4f4bad8 100644 --- a/action.yml +++ b/action.yml @@ -44,10 +44,12 @@ runs: # Ensure lengths match if [ "$path_len" != "$env_len" ]; then - echo "Input must match the output!" + echo "Each path must specify it's environment!" exit 1; fi + echo "Will execute ./infisical export --domain ${{ inputs.api-url }} --projectId ${{ inputs.project-id }} --token TOKEN --env ENV --path PATH" + # For each environment for i in "${!path_list[@]}"; do echo "Getting secrets from path '${path_list[i]}' from '${env_list[i]}'" From 5ef63ab264b91cb81242fd851b00c245a4384c77 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sun, 25 Aug 2024 11:24:54 -0600 Subject: [PATCH 39/40] [CHORE] Adjust Action Logging --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 4f4bad8..4dc4d22 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,9 @@ runs: - name: Infisical CLI install shell: bash run: | + [ -z "${{ inputs.project-id }}" ] && echo "ProjectID was not supplied!" && exit 1 + [ -z "${{ inputs.infisical-token }}" ] && echo "Inficial token was not supplied!" && exit 1 + # Install Infisical Binary echo "Installing Infisical!" curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.28.5/infisical_0.28.5_linux_amd64.tar.gz | tar xvzf - infisical From 38e09a889e954c9872104fd325ea08b3f2cd480b Mon Sep 17 00:00:00 2001 From: Dunemask Date: Sun, 25 Aug 2024 11:28:16 -0600 Subject: [PATCH 40/40] [CHORE] Adjust Action Logging --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 4dc4d22..39bc399 100644 --- a/action.yml +++ b/action.yml @@ -4,15 +4,15 @@ inputs: infisical-token: description: "Infisical API Token" required: true + project-id: + description: "Project to retrieve secrets from using token" + required: true secret-envs: description: "The environments to fetch secrets for (Example: ci or ci,prod,edge )" required: true secret-paths: description: "Secret paths for the secrets (Must match the order of envs! Example: /main or /main,/alt-main)" required: true - project-id: - description: "Infisical Secrets Project" - required: true api-url: description: "Infisical API URL (defaults to https://infisical.dunemask.dev/api)" required: false