File tree Expand file tree Collapse file tree
.github/actions/deploy-setup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,33 @@ inputs:
1515runs :
1616 using : " composite"
1717 steps :
18+ - name : Pull infisical secrets into temporary file
19+ uses : Infisical/secrets-action@v1.0.9
20+ with :
21+ method : " oidc"
22+ identity-id : ${{ inputs.infisical_machine_identity_id }}
23+ project-slug : " infra-deployment"
24+ env-slug : ${{ inputs.environment }}
25+ export-type : " file"
26+ file-output-path : " /.env.infisical"
27+
28+ - name : Transform infisical secrets into make include file, load a few as environment variables
29+ id : load-env
30+ run : |
31+ echo ${{ inputs.environment }} > .last_used_env
32+ cat .env.infisical | sed "s/='\(.*\)'$/=\1/g" > .env.${{ inputs.environment }}
33+
34+ # Load environment variables from .env
35+ set -a
36+ . .env.${{ inputs.environment }}
37+ set +a
38+
39+ echo "GCP_REGION=${GCP_REGION}" >> $GITHUB_ENV
40+ echo "GCP_PROJECT_ID=${GCP_PROJECT_ID}" >> $GITHUB_ENV
41+ echo "TERRAFORM_STATE_BUCKET=${TERRAFORM_STATE_BUCKET}" >> $GITHUB_ENV
42+ echo "GH_WORKLOAD_IDENTITY_PROVIDER=${GH_WORKLOAD_IDENTITY_PROVIDER}" >> $GITHUB_ENV
43+ shell : bash
44+
1845 - name : Load environment variables from Infisical
1946 uses : Infisical/secrets-action@v1.0.15
2047 with :
You can’t perform that action at this time.
0 commit comments