From efb753f50d82317ad4268ec3c64ad16317bf76df Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 21 Jun 2024 12:08:28 +0100 Subject: [PATCH] Do not rebuild every time --- .github/workflows/deploy.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 751853d3..c2d006e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -87,14 +87,14 @@ jobs: sed -i -e "s/%CLOUDS_YAML%/$(base64 -w 0 < clouds.yaml)/" cloud-init.yaml - name: terraform plan id: plan - #if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' run: | cd deploy terraform plan -no-color -var-file="$EGI_SITE.tfvars" continue-on-error: true - name: Update Pull Request uses: actions/github-script@v7 - #if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' env: PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" with: @@ -123,13 +123,13 @@ jobs: run: exit 1 - name: Terraform Apply id: terraform-apply - #if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: | cd deploy terraform apply -auto-approve -var-file="$EGI_SITE.tfvars" - name: Get VM ID id: terraform-vm-id - #if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: | cd deploy terraform output -raw instance-id @@ -169,7 +169,7 @@ jobs: openstack --debug --os-cloud backend object save fedcloud-catchall "${{ steps.terraform-vm-id.outputs.stdout }}" && openstack --debug --os-cloud backend object delete fedcloud-catchall "${{ steps.terraform-vm-id.outputs.stdout }}" - name: Look for errors - #if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: | cd deploy # show the status in the build log