ci/cd - fix secret key
This commit is contained in:
parent
0e2420cfff
commit
64d2ed91ec
|
@ -9,6 +9,10 @@ on:
|
|||
secrets:
|
||||
CICD_SECRETS:
|
||||
required: true
|
||||
SECRET_KEY:
|
||||
required: true
|
||||
K8S_IP:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
create:
|
||||
|
@ -43,6 +47,7 @@ jobs:
|
|||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
REG_USER: ${{ github.actor }}
|
||||
REG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
K8S_IP: ${{ secrets.K8S_IP }}
|
||||
- run: |
|
||||
tar -cf terraform.tar /tmp/${{ inputs.TYPE }}
|
||||
echo "$SECRET_KEY" > /tmp/.secret_key
|
||||
|
|
|
@ -9,6 +9,8 @@ on:
|
|||
secrets:
|
||||
CICD_SECRETS:
|
||||
required: true
|
||||
SECRET_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
delete:
|
||||
|
@ -21,7 +23,6 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
- name: Install terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: tf-${{ inputs.TYPE }}
|
||||
|
|
|
@ -100,6 +100,8 @@ jobs:
|
|||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
K8S_IP: ${{ secrets.K8S_IP }}
|
||||
|
||||
# Perform tests
|
||||
staging-tests:
|
||||
|
@ -163,6 +165,7 @@ jobs:
|
|||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
SECRET_KEY: ${{ secrets.SECRET_KEY }}
|
||||
|
||||
# Push Docker images
|
||||
push-images:
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
echo "${CICD_SECRETS}" > /opt/.env
|
||||
echo "export TF_VAR_k8s_reg_user=${REG_USER}" >> /opt/.env
|
||||
echo "export TF_VAR_k8s_reg_token=${REG_TOKEN}" >> /opt/.env
|
||||
echo "export TF_VAR_k8s_ip=${K8S_IP}" >> /opt/.env
|
||||
chmod +x /opt/.env
|
||||
. /opt/.env
|
||||
|
||||
|
|
Loading…
Reference in New Issue