From 7f8ebb3909ed932dfcc588e9ebc320a42e4a3e8b Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Thu, 13 Apr 2023 08:16:35 +0100 Subject: [PATCH] replace docker build pipeline --- .github/workflows/docker-image.yml | 44 ++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5edf41b..cdc3c9f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -19,15 +19,37 @@ jobs: with: submodules: true - - - name: Publish Docker Image to GitHub Registry - # You may pin to the exact commit or the version. - # uses: TilBlechschmidt/gp-docker-action@f89287d44556dd7d24f76c799cd0795eeb352bcf - uses: TilBlechschmidt/gp-docker-action@v0.2-alpha + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 with: - # GitHub token to push Docker image to GitHub Packages - github-token: ${{ secrets.GH_TOKEN }} - # Docker Image name - image-name: turbopilot - # Path to the directory where the Dockerfile resides - dockerfile-path: . # optional, default is . + platforms: linux/amd64,linux/arm64 + + - name: Login to GH ContainerHub + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ravenscroftj + password: ${{ secrets.GH_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: ghcr.io/ravenscroftj/turbopilot + + # - name: Publish Docker Image to GitHub Registry + # # You may pin to the exact commit or the version. + # # uses: TilBlechschmidt/gp-docker-action@f89287d44556dd7d24f76c799cd0795eeb352bcf + # uses: TilBlechschmidt/gp-docker-action@v0.2-alpha + # with: + # # GitHub token to push Docker image to GitHub Packages + # github-token: ${{ secrets.GH_TOKEN }} + # # Docker Image name + # image-name: turbopilot + # # Path to the directory where the Dockerfile resides + # dockerfile-path: . # optional, default is .