From 4e066acf80ebd810ba52212e8bd5befa70acb239 Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Mon, 30 Jan 2023 19:37:29 +1300 Subject: [PATCH] ARM-only build --- .github/workflows/release.yaml | 73 +++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1364ef0df1..30fef078fe 100755 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -117,7 +117,7 @@ jobs: # FIXME: tried running this separately with the same Docker tag to not slow down the release (currently about 10 min for x86, 40 min for x86+arm64, and several hours if you add armv7), but putting this as a separate task overwrites the image pushed to docker hub by the first one classic_flavour_common_docker_release_build_push_x86: - name: Classic flavour for x86 - Maybe tag version & release Docker image + name: Classic flavour for x86 - release Docker image runs-on: ubuntu-latest env: FLAVOUR: classic @@ -187,6 +187,77 @@ jobs: run: echo ${{ steps.docker_build.outputs.digest }} + classic_flavour_common_docker_release_build_push_arm: + name: Classic flavour for ARM - release Docker image + runs-on: ubuntu-latest + env: + FLAVOUR: classic + FLAVOUR_PATH: flavours/classic + DOCKER_REPO: bonfire + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 2 # needed for action-detect-and-tag-new-version + - + name: Detect new version + id: version + uses: salsify/action-detect-and-tag-new-version@v2 + with: + create-tag: false # tag already created in first job + version-command: | + grep -m 1 'version:' mix.exs | cut -d '"' -f2 + # - + # if: steps.version.outputs.current-version == steps.version.outputs.previous-version + # name: Cancel workflow if the version has not changed + # uses: andymckay/cancel-action@0.2 + # - + # name: Get branch names + # id: branch-name + # uses: tj-actions/branch-names@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # - + # name: Cancel any already running releases workflows + # uses: styfle/cancel-workflow-action@0.9.0 + # with: + # access_token: ${{ github.token }} + - + name: Pre-build prep + run: sudo apt-get install -y cargo && cargo install just && echo "/github/home/.cargo/bin" >> $GITHUB_PATH && just rel-prepare + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + env: + FLAVOUR: classic + FLAVOUR_PATH: data/current_flavour + with: + context: . + file: Dockerfile.release + platforms: linux/arm64 + # platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: | + bonfirenetworks/${{ env.DOCKER_REPO }}:latest-${{ env.FLAVOUR }}-aarch64 + bonfirenetworks/${{ env.DOCKER_REPO }}:${{steps.version.outputs.current-version}}-${{ env.FLAVOUR }}-x86 + - + name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + + cooperation_flavour_docker_release_build_push: name: Cooperation flavour - multiarch - Maybe release Docker image runs-on: ubuntu-latest