Skip to content

Commit

Permalink
debug: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
shejri committed Sep 23, 2024
1 parent ea35779 commit 79db1e1
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ jobs:
with:
terraform_version: 1.9.5

- uses: actions/setup-python@v5
with:
python-version: '3.12'
working-directory: ${{ github.event.inputs.directory }}
- 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 Init'
if: github.event.inputs.directory != ''
working-directory: ${{ github.event.inputs.directory }}
Expand Down Expand Up @@ -112,6 +101,11 @@ jobs:
terraform plan -target=module.${{ github.event.inputs.module }} -out main.tfplan
fi
- uses: actions/setup-python@v5
with:
python-version: '3.12'
working-directory: ${{ github.event.inputs.directory }}
- name: 'Terraform apply'
if: |
github.event.inputs.action == 'apply' &&
Expand All @@ -125,6 +119,10 @@ 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'
Expand Down

0 comments on commit 79db1e1

Please sign in to comment.