From 55be7442ad6d7264c9c687dac68d2e264383ab38 Mon Sep 17 00:00:00 2001 From: Mehrdad Amini Date: Sun, 24 Nov 2024 22:01:02 +0300 Subject: [PATCH] update workflow file --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 358e444..ddbeb99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker image to ghcr.io +name: Build and Push Docker image to GHCR on: push: @@ -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 \ No newline at end of file + docker push $IMAGE_NAME:$IMAGE_TAG + docker push $IMAGE_NAME:latest \ No newline at end of file