fix: simplify terraform deploy job lifecycle
This commit is contained in:
@@ -70,7 +70,6 @@ jobs:
|
|||||||
chmod 644 ~/.ssh/id_ed25519.pub
|
chmod 644 ~/.ssh/id_ed25519.pub
|
||||||
|
|
||||||
- name: Terraform Plan
|
- name: Terraform Plan
|
||||||
id: plan
|
|
||||||
working-directory: terraform
|
working-directory: terraform
|
||||||
run: |
|
run: |
|
||||||
terraform plan \
|
terraform plan \
|
||||||
@@ -78,11 +77,6 @@ jobs:
|
|||||||
-var="ssh_private_key=$HOME/.ssh/id_ed25519" \
|
-var="ssh_private_key=$HOME/.ssh/id_ed25519" \
|
||||||
-out=tfplan \
|
-out=tfplan \
|
||||||
-no-color
|
-no-color
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Fail if plan failed
|
|
||||||
if: steps.plan.outcome == 'failure'
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
- name: Cleanup orphan Proxmox cloud-init volumes
|
- name: Cleanup orphan Proxmox cloud-init volumes
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
@@ -132,13 +126,6 @@ jobs:
|
|||||||
terraform output -json > outputs/terraform_outputs.json
|
terraform output -json > outputs/terraform_outputs.json
|
||||||
working-directory: terraform
|
working-directory: terraform
|
||||||
|
|
||||||
- name: Upload Outputs
|
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: terraform-outputs
|
|
||||||
path: terraform/outputs/terraform_outputs.json
|
|
||||||
|
|
||||||
ansible:
|
ansible:
|
||||||
name: Ansible
|
name: Ansible
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
Reference in New Issue
Block a user