Skip to content

Commit 2f69bda

Browse files
committed
Update prod.docker.yml
1 parent 68d2980 commit 2f69bda

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/prod.docker.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Build latest image
1+
name: Build prod image
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches-ignore:
6+
- main
67

78
env:
89
REGISTRY: ghcr.io
@@ -16,6 +17,10 @@ jobs:
1617
packages: write
1718

1819
steps:
20+
- name: Extract commit SHA
21+
run:
22+
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
23+
1924
- name: Checkout repository
2025
uses: actions/checkout@v4
2126

@@ -28,5 +33,5 @@ jobs:
2833

2934
- name: Build and push Docker image
3035
run: |
31-
docker build --pull -t ${{ env.REGISTRY }}/${{ github.repository }}:latest .
36+
docker build --pull --build-arg COM_SHA=${{ env.SHORT_SHA }} -t ${{ env.REGISTRY }}/${{ github.repository }}:latest .
3237
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest

0 commit comments

Comments
 (0)