diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 0000000..712abc2 --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,29 @@ +name: Build and Push Docker Image to Docker Hub + +on: + release: + types: [published] + +jobs: + + build-push: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: danieloppenlander/cloudflare-ddns:latest,danieloppenlander/cloudflare-ddns:{{ github.event.release.name }}