From 8d098d4752332c29a8cc7ee849005178adbf5d6b Mon Sep 17 00:00:00 2001 From: Kresimir Sutalo Date: Mon, 23 Sep 2024 13:36:47 +0200 Subject: [PATCH] fix: pipeline --- .github/workflows/terraform.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 9d13b54..c3f66bf 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -106,6 +106,14 @@ jobs: with: python-version: '3.12' working-directory: ${{ github.event.inputs.directory }} + - name: Setup Python + run: | + python -m venv venv + ls -lah venv/bin + source venv/bin/activate + pip install -r requirements.txt + working-directory: ${{ github.event.inputs.directory }} + - name: 'Terraform apply' if: | github.event.inputs.action == 'apply' && @@ -119,10 +127,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }} GITHUB_OWNER: ${{ vars.GH_OWNER }} run: | - python -m venv venv - source venv/bin/activate - which python - pip install -r requirements.txt terraform apply -auto-approve main.tfplan - name: 'Terraform destroy'