diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 0000000..479d96a --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,28 @@ +name: Docker Image Build and Push CI + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + environment: prod + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + run: | + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t realsidsun/ntfy.sh:latest --push .