Commit bea7e5d 1 parent abb41db commit bea7e5d Copy full SHA for bea7e5d
File tree 1 file changed +19
-5
lines changed
1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,33 @@ jobs:
25
25
username : ${{ secrets.PRIVATE_REGISTRY_USER }}
26
26
password : ${{ secrets.PRIVATE_REGISTRY_PW }}
27
27
28
+ - name : Extract Docker metadata
29
+ id : meta-docker
30
+ uses : docker/metadata-action@v4
31
+ with :
32
+ images : ${{ secrets.PRIVATE_REGISTRY_URL }}/heppa
33
+ tags : |
34
+ type=schedule
35
+ type=ref,event=branch
36
+ type=ref,event=tag
37
+ type=sha
38
+ ${{ github.event_name == 'release' && format('type=raw,value={0}', github.event.release.tag_name) }}
39
+
28
40
- name : Build and push Docker image
29
- run : |
30
- export TAG=$(echo $GITHUB_SHA | cut -c1-7)
31
- docker build -t ${{ secrets.PRIVATE_REGISTRY_URL }}/heppa:$TAG .
32
- docker push ${{ secrets.PRIVATE_REGISTRY_URL }}/heppa:$TAG
41
+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42
+ with :
43
+ context : .
44
+ push : ${{ github.event_name == 'release' }}
45
+ tags : ${{ steps.meta-docker.outputs.tags }}
46
+ labels : ${{ steps.meta-docker.outputs.labels }}
33
47
34
48
release :
35
49
name : Deploy a new release
36
50
runs-on : ubuntu-latest
37
51
38
52
if : ${{ github.event_name == 'release' }}
39
53
40
- needs : [build]
54
+ needs : [ build ]
41
55
42
56
steps :
43
57
- name : Trigger deployment
You can’t perform that action at this time.
0 commit comments