From 05c7a8047575b5c7c543450067dd4c00273351b9 Mon Sep 17 00:00:00 2001 From: itchymax Date: Wed, 10 Nov 2021 15:48:38 +1100 Subject: [PATCH 1/2] Split up steps of building docker images to get better feedback --- .github/workflows/build-release-binary.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release-binary.yml b/.github/workflows/build-release-binary.yml index 929eef3..c4a5e63 100644 --- a/.github/workflows/build-release-binary.yml +++ b/.github/workflows/build-release-binary.yml @@ -180,10 +180,12 @@ jobs: username: ${{ github.repository }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and publish docker images + - name: Download release from github run: | gh release download ${{ github.event.release.tag_name }} -p '*Linux_x86_64*' -p '*aarch64*' -p '*armv7*' + - name: Unpack archives + run: | # We need to extract into sub folders to so that our dockerimage can fine the binaries. # # By providing `platform` to `docker buildx` the variable `TARGETPLATFORM` will be available @@ -199,6 +201,8 @@ jobs: 7z x maker_${{ github.event.release.tag_name }}_Linux_armv7.tar -olinux/arm/v7 7z x taker_${{ github.event.release.tag_name }}_Linux_armv7.tar -olinux/arm/v7 + - name: Build maker docker image + run: | docker buildx build \ --push \ --platform linux/amd64,linux/arm64,linux/arm/v7 \ @@ -207,6 +211,9 @@ jobs: --build-arg BINARY_PATH=maker \ . + + - name: Build taker docker image + run: | docker buildx build \ --push \ --platform linux/amd64,linux/arm64,linux/arm/v7 \ @@ -217,3 +224,4 @@ jobs: + From 3a8e09eacc69ea1db15ce8d442205fc95f9ee8b6 Mon Sep 17 00:00:00 2001 From: itchymax Date: Wed, 10 Nov 2021 15:59:42 +1100 Subject: [PATCH 2/2] Add permissions to steps --- .github/workflows/build-release-binary.yml | 3 +++ .github/workflows/release-docker.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-release-binary.yml b/.github/workflows/build-release-binary.yml index c4a5e63..d683c52 100644 --- a/.github/workflows/build-release-binary.yml +++ b/.github/workflows/build-release-binary.yml @@ -160,6 +160,9 @@ jobs: needs: build_binaries name: Build docker images runs-on: ubuntu-latest + permissions: + contents: read + packages: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index 7a2ad82..9560cbb 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -12,6 +12,9 @@ jobs: build_docker_image: name: Build docker images runs-on: ubuntu-latest + permissions: + contents: read + packages: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: