File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change 11name : CI
22on :
3- push
3+ push :
4+ branches :
5+ - ' **'
6+ tags :
7+ - ' **'
8+ # pull_request:
9+ # branches:
10+ # - '**'
411
512jobs :
613 build :
@@ -15,12 +22,21 @@ jobs:
1522
1623 - name : Docker meta
1724 id : docker_meta
18- uses : crazy-max/ghaction-docker-meta@v1
25+ uses : docker/metadata-action@v3
1926 with :
2027 images : mormahr/pdf-service
21- tag-sha : false
22- tag-custom : ${{ github.sha }}
23- label-custom : |
28+ flavor : |
29+ latest=auto
30+ tags : |
31+ type=semver,pattern={{version}}
32+ type=semver,pattern={{major}}.{{minor}}
33+ type=semver,pattern={{major}}
34+ type=ref,event=tag
35+ type=ref,event=branch
36+ type=ref,event=pr
37+ type=edge,branch=main
38+ type=sha,format=long
39+ labels : |
2440 org.opencontainers.image.vendor=Moritz Mahringer
2541
2642 - name : Login to DockerHub
5975 with :
6076 username : ${{ secrets.DOCKER_USERNAME }}
6177 password : ${{ secrets.DOCKER_PASSWORD }}
62- image : mormahr/pdf-service:${{ github.sha }}
78+ image : mormahr/pdf-service:sha- ${{ github.sha }}
6379 options : -v ${{ github.workspace }}/coverage:/usr/src/app/coverage
6480 run : |
6581 python -m pytest \
95111
96112 - name : Tag and push existing image as :latest
97113 run : |
98- docker pull mormahr/pdf-service:${{ github.sha }}
99- docker tag mormahr/pdf-service:${{ github.sha }} mormahr/pdf-service:latest
114+ docker pull mormahr/pdf-service:sha- ${{ github.sha }}
115+ docker tag mormahr/pdf-service:sha- ${{ github.sha }} mormahr/pdf-service:latest
100116 docker push mormahr/pdf-service:latest
You can’t perform that action at this time.
0 commit comments