Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lavinci authored Jun 14, 2024
1 parent 3c81f55 commit ba9523c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run:
- name: 构建镜像
run: sudo docker build -t loam:latest .

- name: 推送到阿里云
run: |
sudo docker login --username=${{secrets.ALI_USERNAME}} registry.cn-shanghai.aliyuncs.com --password=${{secrets.ALI_PWD}}
sudo docker build -t loam:$(date +%s) .
sudo docker tag loam:$(date +%s) registry.cn-shanghai.aliyuncs.com/lavinci/loam:$(date +%s)
sudo docker push registry.cn-shanghai.aliyuncs.com/lavinci/loam:$(date +%s)
sudo docker tag loam:latest registry.cn-shanghai.aliyuncs.com/lavinci/loam:latest
sudo docker push registry.cn-shanghai.aliyuncs.com/lavinci/loam:latest
- name: 推送到docker.io
run: |
sudo docker login --username=${{secrets.DOCKER_USERNAME}} --password=${{secrets.DOCKER_PASSWORD}}
sudo docker tag loam:latest lavinci/loam:latest
sudo docker push lavinci/loam:latest

0 comments on commit ba9523c

Please sign in to comment.