Skip to content

Commit

Permalink
update workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmehrdad committed Nov 24, 2024
1 parent 34c7012 commit 55be744
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Docker image to ghcr.io
name: Build and Push Docker image to GHCR

on:
push:
Expand Down Expand Up @@ -36,12 +36,13 @@ jobs:
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
echo "IMAGE_TAG=$TAG" >> $GITHUB_ENV
# Step 4: Build the Docker image
# Step 4: Build the Docker image with both tags
- name: Build Docker image
run: |
docker build -t $IMAGE_NAME:$IMAGE_TAG .
docker build -t $IMAGE_NAME:$IMAGE_TAG -t $IMAGE_NAME:latest .
# Step 5: Push the Docker image to GitHub Container Registry
# Step 5: Push both Docker image tags to GHCR
- name: Push Docker image to GHCR
run: |
docker push $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest

0 comments on commit 55be744

Please sign in to comment.