diff --git a/.github/workflows/master_e2e.yaml b/.github/workflows/master_e2e.yaml index b0444da12..7e1be31c7 100644 --- a/.github/workflows/master_e2e.yaml +++ b/.github/workflows/master_e2e.yaml @@ -268,15 +268,12 @@ jobs: clean-and-delete-runner: needs: [create-runner, e2e] - if: ${{ always() }} + if: ${{ always() && needs.create-runner.result == 'success' && inputs.destroy_runner == true }} uses: ./.github/workflows/sub_clean-and-delete-runner.yaml secrets: credentials: ${{ secrets.credentials }} with: - create_runner_result: ${{ needs.create-runner.result }} - destroy_runner: ${{ inputs.destroy_runner }} runner_hostname: ${{ needs.create-runner.outputs.runner_hostname }} - runner_label: ${{ needs.create-runner.outputs.runner_label }} zone: ${{ inputs.zone }} post-qase: diff --git a/.github/workflows/sub_clean-and-delete-runner.yaml b/.github/workflows/sub_clean-and-delete-runner.yaml index 85c4c6841..1507fba3a 100644 --- a/.github/workflows/sub_clean-and-delete-runner.yaml +++ b/.github/workflows/sub_clean-and-delete-runner.yaml @@ -5,19 +5,9 @@ on: workflow_call: # Variables to set when calling this reusable workflow inputs: - create_runner_result: - description: Status of the create-runner job - required: true - type: string - destroy_runner: - required: true - type: boolean runner_hostname: required: true type: string - runner_label: - required: true - type: string zone: required: true type: string @@ -43,7 +33,6 @@ jobs: uses: google-github-actions/setup-gcloud@v2 - name: Delete runner - if: ${{ inputs.create_runner_result == 'success' && inputs.destroy_runner == true }} run: | # Disable failure on first error, needed for the "delete" check set +e