From f783c566fb00237ff0ca82647ea84a9d4655ce56 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Tue, 10 Mar 2026 13:22:47 +0100 Subject: [PATCH] fix: fix tf acc test pipeline --- .github/actions/acc_test/action.yaml | 10 ++++++---- .github/workflows/tf-acc-test.yaml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index b59bd9ad..de07ff65 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -36,10 +36,9 @@ inputs: default: 'eu01' required: true - service_account_json: + service_account_json_content: description: "STACKIT service account JSON file contents" required: true - default: "" service_account_json_file_path: description: "STACKIT service account JSON file contents" @@ -107,8 +106,11 @@ runs: run: | set -e if [[ ! -f "${{ inputs.service_account_json_file_path }}" ]]; then - echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'" - exit 1 + if [[ -z "${{ inputs.service_account_json_file_content }}" ]]; then + echo "unable to find service account file '${{ inputs.service_account_json_file_path }}' \n and service_account_json_file_content is empty" + exit 1 + fi + echo "${{ inputs.service_account_json_file_content }}" > "${{ inputs.service_account_json_file_path }}" fi cat "${{ inputs.service_account_json_file_path }}" diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 57f0528b..0e7e2b1b 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -27,7 +27,7 @@ jobs: go-version: ${{ env.GO_VERSION }} project_id: ${{ vars.TEST_PROJECT_ID }} region: 'eu01' - service_account_json: ${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON }} + service_account_json_content: "${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON }}" project_user_email: ${{ vars.TEST_PROJECT_USER_EMAIL }} tf_acc_kek_key_id: ${{ vars.TEST_KEK_KEY_ID }} tf_acc_kek_key_ring_id: ${{ vars.TEST_KEK_KEY_RING_ID }}