diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..750584a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,42 @@ +name: Build and push Docker images to Docker Hub + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + build_docker_image: + # This workflow is only of value to Owner and would always be skipped in forks + if: github.repository_owner == 'agriyakhetarpal' + name: Build image + runs-on: buildjet-2vcpu-ubuntu-2204-arm + + steps: + - name: Checkout + 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@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker image to Docker Hub + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + tags: agriyakhetarpal/hugo:latest # To be updated with exact Docker Hub username and image name + push: true + platforms: linux/amd64, linux/arm64 + + - name: List built image(s) + run: docker images diff --git a/Dockerfile b/Dockerfile index 24a403f..24a1b0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.11.9-slim -ENV GO_VERSION=1.22.1 +ENV GO_VERSION=1.22.2 ENV ZIG_VERSION=0.11.0 WORKDIR /