We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68d2980 commit 2f69bdaCopy full SHA for 2f69bda
.github/workflows/prod.docker.yml
@@ -1,8 +1,9 @@
1
-name: Build latest image
+name: Build prod image
2
3
on:
4
push:
5
- branches: [ "main" ]
+ branches-ignore:
6
+ - main
7
8
env:
9
REGISTRY: ghcr.io
@@ -16,6 +17,10 @@ jobs:
16
17
packages: write
18
19
steps:
20
+ - name: Extract commit SHA
21
+ run:
22
+ echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
23
+
24
- name: Checkout repository
25
uses: actions/checkout@v4
26
@@ -28,5 +33,5 @@ jobs:
28
33
29
34
- name: Build and push Docker image
30
35
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 .
32
37
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest
0 commit comments