Skip to content

Commit

Permalink
misc(ci/cd): Fix taggging with github.sha
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzuan committed Nov 4, 2024
1 parent 0ffc933 commit a8a81bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build xyzuan-be Development Build
name: Build xyzuan-api-v2 Development Build

on:
push:
Expand Down Expand Up @@ -38,15 +38,15 @@ jobs:
--build-arg CLOUDINARY_CLOUD_NAME=${{ secrets.CLOUDINARY_CLOUD_NAME }} \
--build-arg CLOUDINARY_API_KEY=${{ secrets.CLOUDINARY_API_KEY }} \
--build-arg CLOUDINARY_API_SECRET=${{ secrets.CLOUDINARY_API_SECRET }} \
-t ghcr.io/xyzuan/xyzuan_be:latest -f misc/Dockerfile.dev .
-t ghcr.io/xyzuan/xyzuan_api_v2:latest -f misc/Dockerfile.dev .
- name: Tag Docker image
run: |
IMAGE_NAME=ghcr.io/xyzuan/xyzuan_be
GIT_SHA=$(echo "${{ github.sha }}" | head -c 7)
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$GIT_SHA
IMAGE_NAME=ghcr.io/xyzuan/xyzuan_api_v2
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$(echo "${{ github.sha }}" | head -c 7)
- name: Push Docker image
run: |
docker login --username xyzuan --password ${{ secrets.GH_TOKEN }} ghcr.io
docker push ghcr.io/xyzuan/xyzuan_be
docker push ghcr.io/xyzuan/xyzuan_api_v2:latest
docker push ghcr.io/xyzuan/xyzuan_api_v2:$(echo "${{ github.sha }}" | head -c 7)

0 comments on commit a8a81bb

Please sign in to comment.