File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
steps :
16
16
- uses : actions/checkout@v3
17
- - name : Build the Docker image
17
+
18
+ - name : Vars
19
+ id : vars
18
20
run : |
19
- docker build . --file Dockerfile --tag ghcr.io/sampozki/botto:latest
21
+ echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV
22
+
23
+ - name : Build image
24
+ run : |
25
+ docker build . --file Dockerfile \
26
+ --tag ghcr.io/sampozki/botto:latest \
27
+ --tag ghcr.io/sampozki/botto:${SHORT_SHA}
20
28
docker images
21
29
22
30
- name : Log in to GitHub Container Registry
25
33
registry : ghcr.io
26
34
username : ${{ github.actor }}
27
35
password : ${{ secrets.TOKEN }}
28
- - name : Push the Docker image to GitHub Container Registry
29
- run : docker push ghcr.io/sampozki/botto:latest
36
+
37
+ - name : Push the image to ghcr
38
+ run : |
39
+ docker push ghcr.io/sampozki/botto:latest
40
+ docker push ghcr.io/sampozki/botto:${SHORT_SHA}
You can’t perform that action at this time.
0 commit comments