Skip to content

Commit 6c2bf69

Browse files
authored
simplify (#5)
1 parent a445559 commit 6c2bf69

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/latest.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
commit_sha:
7-
description: 'Commit SHA to tag as latest (must have successful edge build)'
7+
description: 'Commit SHA to tag as latest (defaults to main)'
88
required: false
99
type: string
10-
default: 'main'
1110

1211
concurrency:
1312
group: latest-release
@@ -48,9 +47,10 @@ jobs:
4847

4948
- name: Verify source image exists
5049
run: |
51-
SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-${{ inputs.commit_sha }}"
50+
COMMIT_SHA="${{ inputs.commit_sha || github.sha }}"
51+
SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-$COMMIT_SHA"
5252
if ! docker manifest inspect "$SOURCE_TAG" > /dev/null 2>&1; then
53-
echo "Error: Image $SOURCE_TAG does not exist. Make sure the edge build completed successfully for commit ${{ inputs.commit_sha }}"
53+
echo "Error: Image $SOURCE_TAG does not exist. Make sure the edge build completed successfully for commit $COMMIT_SHA"
5454
exit 1
5555
fi
5656
echo "✅ Verified $SOURCE_TAG exists"
@@ -75,7 +75,8 @@ jobs:
7575

7676
- name: Retag as latest
7777
run: |
78-
SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-${{ inputs.commit_sha }}"
78+
COMMIT_SHA="${{ inputs.commit_sha || github.sha }}"
79+
SOURCE_TAG="audius/pedalboard:${{ matrix.service }}-$COMMIT_SHA"
7980
LATEST_TAG="audius/pedalboard:${{ matrix.service }}-latest"
8081
docker buildx imagetools create "$SOURCE_TAG" --tag "$LATEST_TAG"
81-
echo "✅ Tagged $SOURCE_TAG as $LATEST_TAG"
82+
echo "✅ Tagged $SOURCE_TAG as $LATEST_TAG"

0 commit comments

Comments
 (0)