@@ -32,29 +32,22 @@ jobs:
32
32
env :
33
33
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
34
35
- - name : Login ghcr.io
36
- uses : docker/login-action@v1
37
- with :
38
- registry : ghcr.io
39
- username : ${{ github.actor }}
40
- password : ${{ secrets.GITHUB_TOKEN }}
35
+ - uses : actions/checkout@v2
36
+ - name : Docker image
37
+ if : ${{ github.event_name != 'pull_request' }}
38
+ run : |
39
+
40
+ docker build -t xyctruth/profiler:latest .
41
+
42
+ docker tag xyctruth/profiler:latest xyctruth/profiler:${{ steps.create_release.outputs.tag_name }}
43
+ docker login --username=xyctruth --password=${{ secrets.DOCKER_TOKEN }}
44
+ docker push xyctruth/profiler:latest
45
+ docker push xyctruth/profiler:${{ steps.create_release.outputs.tag_name }}
46
+
47
+ docker tag xyctruth/profiler:latest ghcr.io/${{ github.repository }}/profiler:latest
48
+ docker tag xyctruth/profiler:latest ghcr.io/${{ github.repository }}/profiler:${{ steps.create_release.outputs.tag_name }}
49
+ docker login ghcr.io --username ${{ github.actor }} --password=${{ secrets.GITHUB_TOKEN }}
50
+ docker push ghcr.io/${{ github.repository }}/profiler:latest
51
+ docker push ghcr.io/${{ github.repository }}/profiler:${{ steps.create_release.outputs.tag_name }}
41
52
42
- - name : Login docker.io
43
- uses : docker/login-action@v1
44
- with :
45
- registry : docker.io
46
- username : xyctruth
47
- password : ${{ secrets.DOCKER_TOKEN }}
48
53
49
- - uses : docker/build-push-action@v2
50
- name : Build and push
51
- if : ${{ github.event_name != 'pull_request' }}
52
- with :
53
- context : .
54
- file : Dockerfile
55
- push : true
56
- tags : |-
57
- docker.io/xyctruth/profiler:latest
58
- docker.io/xyctruth/profiler:${{ steps.create_release.outputs.tag_name }}
59
- ghcr.io/${{ github.repository }}/profiler:latest
60
- ghcr.io/${{ github.repository }}/profiler:${{ steps.create_release.outputs.tag_name }}
0 commit comments