Skip to content

Commit

Permalink
ci: no need to run clean-delete if we want to keep the runner
Browse files Browse the repository at this point in the history
Signed-off-by: Loic Devulder <[email protected]>
  • Loading branch information
ldevulder committed Oct 21, 2024
1 parent cc10aa7 commit 2d70445
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/master_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/sub_clean-and-delete-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2d70445

Please sign in to comment.