Skip to content

Commit 5c2f97d

Browse files
committed
tag images with sha
1 parent 5bd6d7c commit 5c2f97d

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/test_build_push.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
packages: write
5656
env:
5757
IMAGE_NAME: gilcreator/html2rss-web
58+
TAG_SHA: ${{ github.sha }}
5859
steps:
5960
- name: Checkout code
6061
uses: actions/checkout@v4
@@ -65,18 +66,11 @@ jobs:
6566
- name: Set up Docker Buildx
6667
uses: docker/setup-buildx-action@v3
6768

68-
# - name: Log in to DockerHub
69-
# uses: docker/login-action@v3
70-
# with:
71-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
72-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
73-
74-
# - name: Log in to GitHub Container Registry (GHCR)
75-
# uses: docker/login-action@v3
76-
# with:
77-
# registry: ghcr.io
78-
# username: ${{ github.actor }}
79-
# password: ${{ secrets.GITHUB_TOKEN }}
69+
- name: Log in to DockerHub
70+
uses: docker/login-action@v3
71+
with:
72+
username: ${{ secrets.DOCKERHUB_USERNAME }}
73+
password: ${{ secrets.DOCKERHUB_TOKEN }}
8074

8175
- name: Cache Docker layers
8276
uses: actions/cache@v4
@@ -93,7 +87,7 @@ jobs:
9387
push: false
9488
tags: |
9589
gilcreator/html2rss-web:latest
96-
ghcr.io/${{ github.repository_owner }}/html2rss-web:latest
90+
gilcreator/html2rss-web:${{ github.sha }}
9791
platforms: linux/amd64,linux/arm64
9892
cache-from: type=local,src=/tmp/.buildx-cache
9993
cache-to: type=local,dest=/tmp/.buildx-cache-new
@@ -109,7 +103,7 @@ jobs:
109103
- name: Generate SBOM
110104
uses: anchore/[email protected]
111105
with:
112-
image: gilcreator/html2rss-web:latest
106+
image: gilcreator/html2rss-web:${{ github.sha }}
113107
output-file: sbom.spdx.json
114108

115109
- name: Upload SBOM Artifact

0 commit comments

Comments
 (0)