mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
ci(docker): 更新 Docker镜像构建和推送流程
- 添加 Docker Hub 登录步骤 - 更新镜像标签为 latest - 增加镜像推送步骤
This commit is contained in:
parent
059ec22a31
commit
174c30b0e6
15
.github/workflows/docker-image.yml
vendored
15
.github/workflows/docker-image.yml
vendored
@ -7,12 +7,17 @@ on:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag kpxyyyy/dnsmgr:$(date +%s)
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag kpxyyyy/dnsmgr:latest
|
||||
|
||||
- name: Push the Docker image
|
||||
run: docker push kpxyyyy/dnsmgr:latest
|
||||
|
||||
Loading…
Reference in New Issue
Block a user