diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml new file mode 100644 index 00000000..d53269dd --- /dev/null +++ b/.github/workflows/docker-image.yaml @@ -0,0 +1,33 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push the image + uses: docker/build-push-action@v5 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: asif570/testing-workflow:version0asif