Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bdb301e

Browse files
committedJan 21, 2022
update Dokcer build and push
1 parent d332bda commit bdb301e

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed
 

‎.github/workflows/release-drafter.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,22 @@ jobs:
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

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 }}
4152
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 }}
4853
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

Comments
 (0)
Please sign in to comment.