From 80639d696826ddb9b6c580f315a8f97b406da052 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sat, 10 Sep 2022 13:45:06 -0800 Subject: [PATCH] split builders into to jobs --- .github/workflows/partial-builder.yml | 43 ++++++++++++++++++++++----- .github/workflows/release.yml | 1 + 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/partial-builder.yml b/.github/workflows/partial-builder.yml index b14fcab9cc59..0e363a9eb76a 100644 --- a/.github/workflows/partial-builder.yml +++ b/.github/workflows/partial-builder.yml @@ -13,8 +13,42 @@ on: required: true jobs: - build: + build-frontend: runs-on: ubuntu-latest + name: Build Frontend + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + with: + image: tonistiigi/binfmt:latest + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build Frontend Image + working-directory: "frontend" + run: | + docker build --push --no-cache \ + --tag hkotel/mealie:frontend-${{ inputs.tag }} \ + --platform linux/amd64,linux/arm64 . + + build-backend: + runs-on: ubuntu-latest + name: Build Backend steps: - name: Checkout uses: actions/checkout@v2 @@ -44,10 +78,3 @@ jobs: --tag hkotel/mealie:api-${{ inputs.tag }} \ --build-arg COMMIT=$(git rev-parse HEAD) \ --platform linux/amd64,linux/arm64 . - - - name: Build Frontend Image - working-directory: "frontend" - run: | - docker build --push --no-cache \ - --tag hkotel/mealie:frontend-${{ inputs.tag }} \ - --platform linux/amd64,linux/arm64 . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa8e1d4b888a..74e440dc0f85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,7 @@ jobs: with: repository: hay-kot/mealie # The repository to scan. releases-only: true # We know that all relevant tags have a GitHub release for them. + build-release: name: Build Tagged Release uses: ./.github/workflows/partial-builder.yml