dnsmgr/.github/workflows/docker-image.yml
coolxitech 174c30b0e6 ci(docker): 更新 Docker镜像构建和推送流程
- 添加 Docker Hub 登录步骤
- 更新镜像标签为 latest
- 增加镜像推送步骤
2024-11-09 14:06:36 +08:00

24 lines
541 B
YAML

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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