File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 53
53
with :
54
54
image : ${{ env.IMAGE_NAME }}:ci
55
55
run : pytest
56
+ build :
57
+ name : Build and push image
58
+ runs-on : ubuntu-latest
59
+ steps :
60
+ - name : Login to GitHub Container Registry
61
+ uses : docker/login-action@v3
62
+ with :
63
+ registry : ${{ env.REGISTRY }}
64
+ username : ${{ github.actor }}
65
+ password : ${{ secrets.GITHUB_TOKEN }}
66
+ - name : Generate metadata
67
+ id : meta
68
+ uses : docker/metadata-action@v5
69
+ with :
70
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71
+ tags : |
72
+ type=ref,event=branch
73
+ type=ref,event=pr
74
+ type=sha
75
+ - name : Build image
76
+ uses : docker/build-push-action@v5
77
+ if : github.ref == 'refs/heads/main'
78
+ with :
79
+ tags : ${{ steps.meta.outputs.tags }}
80
+ labels : ${{ steps.meta.outputs.labels }}
81
+ target : prod
82
+ load : true
83
+ cache-from : type=gha
84
+ cache-to : type=gha,mode=max
85
+ push : true
You can’t perform that action at this time.
0 commit comments