diff --git a/.github/workflows/staging-create-infra.yml b/.github/workflows/staging-create-infra.yml index 1b698abb..5097c8da 100644 --- a/.github/workflows/staging-create-infra.yml +++ b/.github/workflows/staging-create-infra.yml @@ -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 diff --git a/.github/workflows/staging-delete-infra.yml b/.github/workflows/staging-delete-infra.yml index cd4fa46f..9bb6b521 100644 --- a/.github/workflows/staging-delete-infra.yml +++ b/.github/workflows/staging-delete-infra.yml @@ -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 }} diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index fb44fa92..8e5c5f0d 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -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: diff --git a/tests/create.sh b/tests/create.sh index a6ee5d3b..0e1df51d 100755 --- a/tests/create.sh +++ b/tests/create.sh @@ -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