Skip to content

Commit 222626c

Browse files
committed
Fix SHA label for image autodeploy
1 parent 3172d35 commit 222626c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,16 @@ jobs:
6767
labels: ${{ steps.meta.outputs.labels }}
6868
build-args: VERSION=${{ github.sha }}
6969

70+
- name: Extract sha-* image label
71+
id: extract-sha
72+
run: |
73+
sha_tag=$(echo "${{ steps.meta.outputs.tags }}" | grep -o 'sha-[^[:space:]]*' | head -n 1)
74+
echo "sha_tag=$sha_tag" >> $GITHUB_OUTPUT
75+
7076
- name: Deploy to Bunny
7177
uses: BunnyWay/actions/container-update-image@container-update-image_0.1.1
7278
with:
7379
app_id: ${{ vars.BUNNY_APP_ID }}
7480
api_key: ${{ secrets.BUNNY_API_KEY }}
7581
container: TestServer
76-
image_tag: "${{ github.sha }}"
82+
image_tag: "${{ steps.extract-sha.outputs.sha_tag }}"

0 commit comments

Comments
 (0)