diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 140c9f6..6e54c69 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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