From d7fc15bce50dd7569ffe599318e98e51851317ee Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Thu, 26 Oct 2023 14:46:13 -0700 Subject: [PATCH] Ensure that cleanup input is used on workflow_dispatch --- .github/workflows/alpha-e2e-scale-trigger.yaml | 3 ++- .github/workflows/e2e-conformance-trigger.yaml | 3 ++- .github/workflows/e2e-matrix-trigger.yaml | 3 ++- .github/workflows/e2e-scale-trigger.yaml | 3 ++- .github/workflows/test-workflow-call.yaml | 14 -------------- .github/workflows/test.yaml | 13 ------------- 6 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/test-workflow-call.yaml delete mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/alpha-e2e-scale-trigger.yaml b/.github/workflows/alpha-e2e-scale-trigger.yaml index f25dc7ca29cb..699d81427217 100644 --- a/.github/workflows/alpha-e2e-scale-trigger.yaml +++ b/.github/workflows/alpha-e2e-scale-trigger.yaml @@ -38,6 +38,7 @@ jobs: region: ${{ inputs.region || 'us-west-2' }} enable_metrics: ${{ inputs.enable_metrics || true }} workflow_trigger: "alpha-scale" - cleanup: ${{ inputs.cleanup || true }} + # Default to true unless using a workflow_dispatch + cleanup: ${{ github.event_name != 'workflow_dispatch' && true || inputs.cleanup }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/e2e-conformance-trigger.yaml b/.github/workflows/e2e-conformance-trigger.yaml index 251ee0476fbb..4f2e8e0063df 100644 --- a/.github/workflows/e2e-conformance-trigger.yaml +++ b/.github/workflows/e2e-conformance-trigger.yaml @@ -37,6 +37,7 @@ jobs: region: ${{ inputs.region || 'eu-west-1' }} k8s_version: ${{ matrix.k8s_version }} workflow_trigger: "conformance" - cleanup: ${{ inputs.cleanup || true }} + # Default to true unless using a workflow_dispatch + cleanup: ${{ github.event_name != 'workflow_dispatch' && true || inputs.cleanup }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/e2e-matrix-trigger.yaml b/.github/workflows/e2e-matrix-trigger.yaml index 48360660ca40..86cb283ad393 100644 --- a/.github/workflows/e2e-matrix-trigger.yaml +++ b/.github/workflows/e2e-matrix-trigger.yaml @@ -34,6 +34,7 @@ jobs: git_ref: ${{ needs.resolve.outputs.GIT_REF }} region: ${{ inputs.region || 'us-east-2' }} workflow_trigger: "matrix" - cleanup: ${{ inputs.cleanup || true }} + # Default to true unless using a workflow_dispatch + cleanup: ${{ github.event_name != 'workflow_dispatch' && true || inputs.cleanup }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/e2e-scale-trigger.yaml b/.github/workflows/e2e-scale-trigger.yaml index d69240e07b63..a711cf5ec9a4 100644 --- a/.github/workflows/e2e-scale-trigger.yaml +++ b/.github/workflows/e2e-scale-trigger.yaml @@ -38,6 +38,7 @@ jobs: region: ${{ inputs.region || 'us-west-2' }} enable_metrics: ${{ inputs.enable_metrics || true }} workflow_trigger: "scale" - cleanup: ${{ inputs.cleanup || true }} + # Default to true unless using a workflow_dispatch + cleanup: ${{ github.event_name != 'workflow_dispatch' && true || inputs.cleanup }} secrets: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/test-workflow-call.yaml b/.github/workflows/test-workflow-call.yaml deleted file mode 100644 index 82e5c96060a3..000000000000 --- a/.github/workflows/test-workflow-call.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: TestWorkflowCall -on: - workflow_call: - inputs: - cleanup: - type: boolean - required: true -jobs: - run-suite: - runs-on: ubuntu-latest - steps: - - if: ${{ inputs.cleanup }} - run: | - echo "Hello" \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 8202c758bbe7..000000000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: Test -on: - workflow_dispatch: - inputs: - cleanup: - type: boolean - required: true - default: true -jobs: - run-suite: - uses: ./.github/workflows/test-workflow-call.yaml - with: - cleanup: ${{ inputs.cleanup }} \ No newline at end of file