From 6ca7f69fffedc8747259b0e1668d6b1a8211591f Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Thu, 8 Sep 2022 15:09:26 -0800 Subject: [PATCH] container workflow --- .github/workflows/publish.yaml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 7677693..8cc8c4e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,8 +1,8 @@ -name: Build Docker Image +name: Build Nightly on: push: - branches: [master] + branches: [main] jobs: publish: @@ -13,11 +13,28 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.19 + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + with: + image: tonistiigi/binfmt:latest + platforms: all + + - name: install buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + - name: login to container registry run: docker login ghcr.io --username hay-kot --password $CR_PAT env: CR_PAT: ${{ secrets.CR_PAT }} - - name: Build Docker Image - run: cd backend && docker build -t ghcr.io/hay-kot/content:latest . - - name: push to container registry - run: docker push ghcr.io/hay-kot/content:latest + + - name: build the image + run: | + cd backend && docker build --push --no-cache \ + --tag ghrc.io/hay-kot/homebox:nightly \ + --build-arg COMMIT=$(git rev-parse HEAD) \ + --platform linux/amd64,linux/arm64,linux/arm/v7 .