Skip to content

Commit 2cba497

Browse files
authored
Update build-and-publish-docker.yml
1 parent acd1513 commit 2cba497

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/build-and-publish-docker.yml

+19-13
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ jobs:
6262
# This step logs in to the Docker registry so that images can be pushed
6363

6464
# Step 6: Extract Docker image metadata (tags, labels)
65-
- name: Extract Docker metadata
66-
id: meta # Assigns an ID to this step for referencing its outputs later
67-
uses: docker/metadata-action@v5
68-
with:
69-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70-
tags: |
71-
# Define tags for the Docker image using version information
72-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
73-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR_MINOR_PATCH }}
74-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR_MINOR }}
75-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR }}
65+
#- name: Extract Docker metadata
66+
# id: meta # Assigns an ID to this step for referencing its outputs later
67+
# uses: docker/metadata-action@v5
68+
# with:
69+
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70+
# tags: |
71+
# # Define tags for the Docker image using version information
72+
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
73+
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR_MINOR_PATCH }}
74+
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR_MINOR }}
75+
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.MAJOR }}
7676

7777
# Step 7: Build and push Docker image using Docker Buildx
7878
- name: Build and push Docker image
@@ -81,8 +81,14 @@ jobs:
8181
with:
8282
context: . # The context is the root of the repository
8383
push: ${{ github.event_name != 'pull_request' }} # Only push if not a PR
84-
tags: ${{ steps.meta.outputs.tags }} # Use the tags generated in the previous step
85-
labels: ${{ steps.meta.outputs.labels }} # Use the labels generated in the previous step
84+
tags: |
85+
# Define tags for the Docker image using version information
86+
latest
87+
${{ env.MAJOR_MINOR_PATCH }}
88+
${{ env.MAJOR_MINOR }}
89+
${{ env.MAJOR }}
90+
# tags: ${{ steps.meta.outputs.tags }} # Use the tags generated in the previous step
91+
# labels: ${{ steps.meta.outputs.labels }} # Use the labels generated in the previous step
8692
cache-from: type=gha # Use GitHub Actions cache to speed up builds
8793
cache-to: type=gha,mode=max # Store the cache in GitHub Actions for reuse
8894
# This step builds the Docker image and pushes it to the registry (if not a PR)

0 commit comments

Comments
 (0)