From a9518c94952e2c346f9df865c4f1624af4a5f943 Mon Sep 17 00:00:00 2001 From: Sid Sun Date: Sun, 22 Sep 2024 01:10:15 +0530 Subject: [PATCH] add docker build action Signed-off-by: Sid Sun --- .github/workflows/docker-build-push.yml | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/docker-build-push.yml 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 .