From 3d04e1497bf9dcbf09bb199e4557bb9340c4f343 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Tue, 10 Mar 2026 13:11:53 +0100 Subject: [PATCH] fix: fix tf acc test pipeline --- .github/actions/acc_test/action.yaml | 9 ++++++--- .github/workflows/tf-acc-test.yaml | 7 +++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 3f547033..6c98b19a 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -102,11 +102,14 @@ runs: shell: bash run: go mod tidy - - name: Crete service account file + - name: Ensure service account file exists shell: bash run: | - mkdir -p $(dirname "${{ inputs.service_account_json_file_path }}") - echo "${{ inputs.service_account_json }}" > "${{ inputs.service_account_json_file_path }}" + set -e + if [[ ! -f "${{ inputs.service_account_json_file_path }}" ]]; then + echo "unable to find service account file" + exit 1 + fi cat "${{ inputs.service_account_json_file_path }}" - name: Run acceptance test file diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index b5d69ae0..1c97cb0d 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -18,9 +18,8 @@ jobs: shell: bash run: | set -e - mkdir ~/.stackit - echo "${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON }}" >~/.stackit/credentials.json - cat ~/.stackit/credentials.json + echo "${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON }}" >~/service_account.json + cat ~/service_account.json - name: Run Test uses: ./.github/actions/acc_test @@ -34,4 +33,4 @@ jobs: tf_acc_kek_key_ring_id: ${{ vars.TEST_KEK_KEY_RING_ID }} tf_acc_kek_key_version: ${{ vars.TEST_KEK_KEY_VERSION }} tf_acc_kek_service_account: ${{ vars.TEST_KEK_SERVICE_ACCOUNT }} - # service_account_json_file_path: ~/.stackit/credentials.json + service_account_json_file_path: ~/service_account.json