From 073e83f3f650a1376c6cf1f33fc39bd210b294f7 Mon Sep 17 00:00:00 2001 From: Alec Savvy Date: Fri, 5 Sep 2025 16:19:45 -0600 Subject: [PATCH] simplify --- .github/workflows/latest.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index dde6dab..89fee8c 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -4,10 +4,9 @@ on: workflow_dispatch: inputs: commit_sha: - description: 'Commit SHA to tag as latest (must have successful edge build)' + description: 'Commit SHA to tag as latest (defaults to main)' required: false type: string - default: 'main' concurrency: group: latest-release @@ -48,9 +47,10 @@ jobs: - name: Verify source image exists run: | - SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-${{ inputs.commit_sha }}" + COMMIT_SHA="${{ inputs.commit_sha || github.sha }}" + SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-$COMMIT_SHA" if ! docker manifest inspect "$SOURCE_TAG" > /dev/null 2>&1; then - echo "Error: Image $SOURCE_TAG does not exist. Make sure the edge build completed successfully for commit ${{ inputs.commit_sha }}" + echo "Error: Image $SOURCE_TAG does not exist. Make sure the edge build completed successfully for commit $COMMIT_SHA" exit 1 fi echo "✅ Verified $SOURCE_TAG exists" @@ -75,7 +75,8 @@ jobs: - name: Retag as latest run: | - SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-${{ inputs.commit_sha }}" + COMMIT_SHA="${{ inputs.commit_sha || github.sha }}" + SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-$COMMIT_SHA" LATEST_TAG="audius/pedalboard:${{ matrix.service }}-latest" docker buildx imagetools create "$SOURCE_TAG" --tag "$LATEST_TAG" - echo "✅ Tagged $SOURCE_TAG as $LATEST_TAG" \ No newline at end of file + echo "✅ Tagged $SOURCE_TAG as $LATEST_TAG"