From e2a9e2831385637e20e8905b59777e36bfc23371 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 23 Aug 2025 17:05:07 -0700 Subject: [PATCH] perf: Optimize workflow step order for efficiency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorder steps to check what's needed first, then only set up Docker environment if build is actually required. This avoids expensive Docker setup when only label changes occur. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/showtime-trigger.yml | 34 +++++++++++--------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/showtime-trigger.yml b/.github/workflows/showtime-trigger.yml index a4997b38ef3..e8d0bb36502 100644 --- a/.github/workflows/showtime-trigger.yml +++ b/.github/workflows/showtime-trigger.yml @@ -89,26 +89,7 @@ jobs: echo "deploy_needed=$DEPLOY" >> $GITHUB_OUTPUT echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - - name: Checkout repository for local actions - if: steps.check.outputs.build_needed == 'true' - uses: actions/checkout@v4 - with: - fetch-depth: 1 - persist-credentials: false - - - name: Setup Docker Environment - if: steps.check.outputs.build_needed == 'true' - uses: ./.github/actions/setup-docker - with: - dockerhub-user: ${{ env.DOCKERHUB_USER }} - dockerhub-token: ${{ env.DOCKERHUB_TOKEN }} - build: "true" - - - name: Setup supersetbot - if: steps.check.outputs.build_needed == 'true' - uses: ./.github/actions/setup-supersetbot/ - - - name: Get PR SHA for build + - name: Get SHA for potential build id: sha if: steps.check.outputs.build_needed == 'true' run: | @@ -140,8 +121,21 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ steps.sha.outputs.build_sha }} + fetch-depth: 1 persist-credentials: false + - name: Setup Docker Environment + if: steps.check.outputs.build_needed == 'true' + uses: ./.github/actions/setup-docker + with: + dockerhub-user: ${{ env.DOCKERHUB_USER }} + dockerhub-token: ${{ env.DOCKERHUB_TOKEN }} + build: "true" + + - name: Setup supersetbot + if: steps.check.outputs.build_needed == 'true' + uses: ./.github/actions/setup-supersetbot/ + - name: Build Docker image if: steps.check.outputs.build_needed == 'true' run: |