From 85f9d22afd3180e2c0f415c6ff2c29c3cd0205c3 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Thu, 17 Oct 2024 23:12:57 +0530 Subject: [PATCH 01/22] Update build.yml --- .github/workflows/build.yml | 86 ++++++++++++------------------------- 1 file changed, 27 insertions(+), 59 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 246e383..b78bf74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,46 +5,40 @@ on: push: branches: - master + - feature/** tags: - 'v*.*.*' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - REGISTRY_IMAGE: metacall/guix - GUIX_VERSION: 1.4.0 - BUILDKIT_VERSION: 0.13.0 - jobs: build: name: Build the Docker image runs-on: ubuntu-latest + + env: + REGISTRY_IMAGE: mryash/guixx + GUIX_VERSION: 1.4.0 + BUILDKIT_VERSION: 0.13.0 + strategy: fail-fast: false matrix: platform: [ { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux }, - - # TODO: - - # guix error: cloning builder process: Invalid argument (https://lists.gnu.org/archive/html/help-guix/2017-12/msg00023.html) - # { docker: linux/arm/v7, guix: armhf-linux }, - - # ERROR: failed to solve: ResourceExhausted: process "/bin/sh -c sh -c '/entry-point.sh guix pull ..." did not complete successfully: cannot allocate memory - # { docker: linux/arm64/v8, guix: aarch64-linux }, - # { docker: linux/ppc64le, guix: powerpc64le-linux } ] - steps: + steps: + - name: Prepare + run: | + platform=${{ matrix.platform.docker }} + echo "PLATFORM_TAG=${platform//\//-}" >> $GITHUB_ENV + - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -55,7 +49,7 @@ jobs: - name: Verify Docker BuildX Version run: docker buildx version - + - name: Create a new builder instance run: docker buildx create --use --name insecure-builder --buildkitd-flags '--allow-insecure-entitlement security.insecure' @@ -66,53 +60,30 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push by digest - id: build + - name: Build and push uses: docker/build-push-action@v6 with: - platforms: ${{ matrix.docker.platform }} + platforms: ${{ matrix.platform.docker }} labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,name=docker.io/${{ env.REGISTRY_IMAGE }},push-by-digest=${{ github.event_name != 'pull_request' }},name-canonical=true,push=${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ env.REGISTRY_IMAGE }}:${{ env.PLATFORM_TAG }} allow: security.insecure build-args: | METACALL_GUIX_VERSION=${{ env.GUIX_VERSION }} METACALL_GUIX_ARCH=${{ matrix.platform.guix }} - - - name: Export digest - if: github.event_name != 'pull_request' - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - - name: Upload digest - if: github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: digests-${{ matrix.platform.guix }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 merge: - name: Merge digests for the manifest + name: Merge manifests runs-on: ubuntu-latest if: github.event_name != 'pull_request' needs: - build steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: version: v${{ env.BUILDKIT_VERSION }} - + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -124,14 +95,11 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Create manifest list and push - working-directory: /tmp/digests - shell: bash - run: | - set -exuo pipefail - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - - name: Inspect image + - name: Create manifest list and push run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} + docker buildx imagetools create \ + --annotation "org.opencontainers.image.authors=dvdksn" \ + --tag ${{ env.REGISTRY_IMAGE }}:latest \ + ${{ env.REGISTRY_IMAGE }}:linux-amd64 \ + ${{ env.REGISTRY_IMAGE }}:linux-386 From 08ec79b69c59faa8e3375f84ad90dbb832149f10 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Thu, 17 Oct 2024 23:37:01 +0530 Subject: [PATCH 02/22] Update build.yml --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b78bf74..09d5f09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest env: - REGISTRY_IMAGE: mryash/guixx + REGISTRY_IMAGE: yash/guixx GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 @@ -25,13 +25,17 @@ jobs: platform: [ { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux }, + # TODO: Uncomment these when the issues are resolved + # { docker: linux/arm/v7, guix: armhf-linux }, + # { docker: linux/arm64/v8, guix: aarch64-linux }, + # { docker: linux/ppc64le, guix: powerpc64le-linux } ] steps: - name: Prepare run: | platform=${{ matrix.platform.docker }} - echo "PLATFORM_TAG=${platform//\//-}" >> $GITHUB_ENV + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Docker meta id: meta @@ -60,25 +64,46 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push + - name: Build and push by digest + id: build uses: docker/build-push-action@v6 with: platforms: ${{ matrix.platform.docker }} labels: ${{ steps.meta.outputs.labels }} - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.REGISTRY_IMAGE }}:${{ env.PLATFORM_TAG }} + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true allow: security.insecure build-args: | METACALL_GUIX_VERSION=${{ env.GUIX_VERSION }} METACALL_GUIX_ARCH=${{ matrix.platform.guix }} + + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 merge: - name: Merge manifests + name: Merge digests for the manifest runs-on: ubuntu-latest if: github.event_name != 'pull_request' needs: - build steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: @@ -97,9 +122,9 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Create manifest list and push + working-directory: /tmp/digests run: | docker buildx imagetools create \ --annotation "org.opencontainers.image.authors=dvdksn" \ - --tag ${{ env.REGISTRY_IMAGE }}:latest \ - ${{ env.REGISTRY_IMAGE }}:linux-amd64 \ - ${{ env.REGISTRY_IMAGE }}:linux-386 + $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From c98042d2c20f82d58d282f266d799977499a9cf9 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 00:00:56 +0530 Subject: [PATCH 03/22] Update build.yml --- .github/workflows/build.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09d5f09..85ec56d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,13 +9,17 @@ on: tags: - 'v*.*.*' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: name: Build the Docker image runs-on: ubuntu-latest env: - REGISTRY_IMAGE: yash/guixx + REGISTRY_IMAGE: mryash/guix GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 @@ -24,10 +28,10 @@ jobs: matrix: platform: [ { docker: linux/amd64, guix: x86_64-linux }, - { docker: linux/386, guix: i686-linux }, - # TODO: Uncomment these when the issues are resolved - # { docker: linux/arm/v7, guix: armhf-linux }, - # { docker: linux/arm64/v8, guix: aarch64-linux }, + { docker: linux/386, guix: i686-linux } + # TODO: + # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument + # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory # { docker: linux/ppc64le, guix: powerpc64le-linux } ] @@ -81,7 +85,7 @@ jobs: mkdir -p /tmp/digests digest="${{ steps.build.outputs.digest }}" touch "/tmp/digests/${digest#sha256:}" - + - name: Upload digest uses: actions/upload-artifact@v4 with: @@ -128,3 +132,7 @@ jobs: --annotation "org.opencontainers.image.authors=dvdksn" \ $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} From 9e972e3fa2cd69f4fed5bfea6878d81c51942503 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 21:37:23 +0530 Subject: [PATCH 04/22] Update build.yml --- .github/workflows/build.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85ec56d..eccdf6e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,26 +9,22 @@ on: tags: - 'v*.*.*' -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true +env: + REGISTRY_IMAGE: mryash/guixxx + GUIX_VERSION: 1.4.0 + BUILDKIT_VERSION: 0.13.0 jobs: build: name: Build the Docker image runs-on: ubuntu-latest - env: - REGISTRY_IMAGE: mryash/guix - GUIX_VERSION: 1.4.0 - BUILDKIT_VERSION: 0.13.0 - strategy: fail-fast: false matrix: platform: [ { docker: linux/amd64, guix: x86_64-linux }, - { docker: linux/386, guix: i686-linux } + { docker: linux/386, guix: i686-linux }, # TODO: # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory @@ -40,7 +36,7 @@ jobs: run: | platform=${{ matrix.platform.docker }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -79,7 +75,7 @@ jobs: build-args: | METACALL_GUIX_VERSION=${{ env.GUIX_VERSION }} METACALL_GUIX_ARCH=${{ matrix.platform.guix }} - + - name: Export digest run: | mkdir -p /tmp/digests @@ -100,6 +96,7 @@ jobs: if: github.event_name != 'pull_request' needs: - build + steps: - name: Download digests uses: actions/download-artifact@v4 @@ -132,7 +129,3 @@ jobs: --annotation "org.opencontainers.image.authors=dvdksn" \ $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - - - name: Inspect image - run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} From 8d2fd4b096198b04dafd06185beaadd1583d084b Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 21:44:57 +0530 Subject: [PATCH 05/22] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eccdf6e..b8e4112 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: - 'v*.*.*' env: - REGISTRY_IMAGE: mryash/guixxx + REGISTRY_IMAGE: mryash/guix GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 @@ -28,7 +28,7 @@ jobs: # TODO: # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory - # { docker: linux/ppc64le, guix: powerpc64le-linux } + # { docker: linux/ppc64le, guix: powerpc64le-linux } # ERROR: ResourceExhausted: cannot allocate memory ] steps: From 3d1e043e8de471cacf06ec0743177e4395ac9881 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 22:22:01 +0530 Subject: [PATCH 06/22] Update build.yml --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8e4112..cf707bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,10 +122,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Create manifest list and push + - name: Create manifest list and push working-directory: /tmp/digests run: | + TAGS=$(jq -r '.tags[]' <<< "${{ steps.meta.outputs.json }}") docker buildx imagetools create \ --annotation "org.opencontainers.image.authors=dvdksn" \ - $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ + ${TAGS} \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 3bb686296283df0b78b55c2b9655833f1e8725a6 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 22:23:03 +0530 Subject: [PATCH 07/22] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf707bb..d23b661 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,7 +122,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Create manifest list and push + - name: Create manifest list and push working-directory: /tmp/digests run: | TAGS=$(jq -r '.tags[]' <<< "${{ steps.meta.outputs.json }}") From 0d6d0a0fd4801bcb37ee7e1b27aa60fbdf94e39e Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 22:54:11 +0530 Subject: [PATCH 08/22] Update build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d23b661..14b7a18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,8 +125,8 @@ jobs: - name: Create manifest list and push working-directory: /tmp/digests run: | - TAGS=$(jq -r '.tags[]' <<< "${{ steps.meta.outputs.json }}") + TAGS=$(echo '${{ steps.meta.outputs.json }}' | jq -r '.tags[]') docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ - ${TAGS} \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + --annotation "org.opencontainers.image.authors=dvdksn" \ + $(echo "$TAGS" | xargs -I {} echo '${{ env.REGISTRY_IMAGE }}:{}') \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 7cf3575eb9dbe787c7811378087eb42103152e03 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 23:20:15 +0530 Subject: [PATCH 09/22] Update build.yml --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14b7a18..004c4bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,7 +126,8 @@ jobs: working-directory: /tmp/digests run: | TAGS=$(echo '${{ steps.meta.outputs.json }}' | jq -r '.tags[]') + TAG_ARGS=$(echo "$TAGS" | sed 's/^/--tag /') docker buildx imagetools create \ --annotation "org.opencontainers.image.authors=dvdksn" \ - $(echo "$TAGS" | xargs -I {} echo '${{ env.REGISTRY_IMAGE }}:{}') \ + $TAG_ARGS \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 1d5f0dc6ab168887eba2afe98d5cb819879db53e Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 18 Oct 2024 23:46:43 +0530 Subject: [PATCH 10/22] Update build.yml --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 004c4bb..57f71e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,6 +128,5 @@ jobs: TAGS=$(echo '${{ steps.meta.outputs.json }}' | jq -r '.tags[]') TAG_ARGS=$(echo "$TAGS" | sed 's/^/--tag /') docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ $TAG_ARGS \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 3de9e7bba5c4010c924c90e58645835ddd4588ad Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake <23ug1-0099@sltc.ac.lk> Date: Sat, 19 Oct 2024 00:49:15 +0530 Subject: [PATCH 11/22] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57f71e3..9d16ed2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,7 @@ jobs: platforms: ${{ matrix.platform.docker }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + tags: ${{ env.REGISTRY_IMAGE }}:latest allow: security.insecure build-args: | METACALL_GUIX_VERSION=${{ env.GUIX_VERSION }} From fcd77415f491aa05cb671d2483feb132235ce8de Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake <23ug1-0099@sltc.ac.lk> Date: Sat, 19 Oct 2024 00:49:31 +0530 Subject: [PATCH 12/22] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d16ed2..83a1f1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: - 'v*.*.*' env: - REGISTRY_IMAGE: mryash/guix + REGISTRY_IMAGE: mryash/guixx GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 From f2d5925914279a0ca62940f609db295690beec58 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sat, 19 Oct 2024 13:33:21 +0530 Subject: [PATCH 13/22] Update build.yml --- .github/workflows/build.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83a1f1a..7727565 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: - 'v*.*.*' env: - REGISTRY_IMAGE: mryash/guixx + REGISTRY_IMAGE: mryash/1.11 GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 @@ -26,9 +26,9 @@ jobs: { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux }, # TODO: - # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument - # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory - # { docker: linux/ppc64le, guix: powerpc64le-linux } # ERROR: ResourceExhausted: cannot allocate memory + { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument + { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory + { docker: linux/ppc64le, guix: powerpc64le-linux } ] steps: @@ -71,7 +71,6 @@ jobs: platforms: ${{ matrix.platform.docker }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true - tags: ${{ env.REGISTRY_IMAGE }}:latest allow: security.insecure build-args: | METACALL_GUIX_VERSION=${{ env.GUIX_VERSION }} @@ -126,8 +125,7 @@ jobs: - name: Create manifest list and push working-directory: /tmp/digests run: | - TAGS=$(echo '${{ steps.meta.outputs.json }}' | jq -r '.tags[]') - TAG_ARGS=$(echo "$TAGS" | sed 's/^/--tag /') docker buildx imagetools create \ - $TAG_ARGS \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + --annotation "org.opencontainers.image.authors=dvdksn" \ + $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 7966f9d5cc0494130837fc3061ad315f5b4cc3b9 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sat, 19 Oct 2024 14:41:10 +0530 Subject: [PATCH 14/22] Update build.yml --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7727565..2361e96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,9 +26,9 @@ jobs: { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux }, # TODO: - { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument - { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory - { docker: linux/ppc64le, guix: powerpc64le-linux } + # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument + # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory + # { docker: linux/ppc64le, guix: powerpc64le-linux } ] steps: From 452b512d3c9417320353dc3484b4c1b610684e6f Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake <23ug1-0099@sltc.ac.lk> Date: Sat, 19 Oct 2024 17:25:13 +0530 Subject: [PATCH 15/22] Update build.yml --- .github/workflows/build.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2361e96..80e5fd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: - 'v*.*.*' env: - REGISTRY_IMAGE: mryash/1.11 + REGISTRY_IMAGE: mryash/2.22 GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0 @@ -24,11 +24,11 @@ jobs: matrix: platform: [ { docker: linux/amd64, guix: x86_64-linux }, - { docker: linux/386, guix: i686-linux }, - # TODO: - # { docker: linux/arm/v7, guix: armhf-linux }, # guix error: cloning builder process: Invalid argument - # { docker: linux/arm64/v8, guix: aarch64-linux }, # ERROR: ResourceExhausted: cannot allocate memory - # { docker: linux/ppc64le, guix: powerpc64le-linux } + { docker: linux/386, guix: i686-linux } + # TODO: Uncomment architectures when fixed + # { docker: linux/arm/v7, guix: armhf-linux }, # Issue: Invalid argument + # { docker: linux/arm64/v8, guix: aarch64-linux }, # Issue: Cannot allocate memory + # { docker: linux/ppc64le, guix: powerpc64le-linux } ] steps: @@ -125,7 +125,12 @@ jobs: - name: Create manifest list and push working-directory: /tmp/digests run: | + # Ensure that jq handles the outputs correctly + # Log the meta output to verify JSON structure + echo "Meta output JSON: ${{ steps.meta.outputs.json }}" + + # Create the manifest with jq docker buildx imagetools create \ --annotation "org.opencontainers.image.authors=dvdksn" \ $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) \ No newline at end of file From ea8777ce014293d5770705702edfe11e8607cea6 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake <23ug1-0099@sltc.ac.lk> Date: Sun, 20 Oct 2024 12:46:08 +0530 Subject: [PATCH 16/22] Update build.yml --- .github/workflows/build.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80e5fd1..e407ba3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: platform: [ { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux } - # TODO: Uncomment architectures when fixed + # Uncomment when issues are resolved # { docker: linux/arm/v7, guix: armhf-linux }, # Issue: Invalid argument # { docker: linux/arm64/v8, guix: aarch64-linux }, # Issue: Cannot allocate memory # { docker: linux/ppc64le, guix: powerpc64le-linux } @@ -42,6 +42,13 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} + tags: | + type=ref,event=branch + type=ref,event=tag + type=sha + + - name: Debug meta JSON + run: echo "Meta JSON: ${{ steps.meta.outputs.json }}" - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -125,12 +132,16 @@ jobs: - name: Create manifest list and push working-directory: /tmp/digests run: | - # Ensure that jq handles the outputs correctly - # Log the meta output to verify JSON structure echo "Meta output JSON: ${{ steps.meta.outputs.json }}" - # Create the manifest with jq - docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ - $(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) \ No newline at end of file + # Extract tags using jq + tags=$(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") + echo "Tags to be used: $tags" + + # Loop through each digest and push the manifest + for digest in $(ls /tmp/digests); do + docker buildx imagetools create \ + --annotation "org.opencontainers.image.authors=dvdksn" \ + $tags \ + "${{ env.REGISTRY_IMAGE }}@sha256:${digest}" + done \ No newline at end of file From 14b971aecf1e863483bae8c8d3c342e351e4d1d7 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sun, 20 Oct 2024 14:35:35 +0530 Subject: [PATCH 17/22] Update build.yml --- .github/workflows/build.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e407ba3..2d4803d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,16 +132,9 @@ jobs: - name: Create manifest list and push working-directory: /tmp/digests run: | - echo "Meta output JSON: ${{ steps.meta.outputs.json }}" - - # Extract tags using jq - tags=$(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "${{ steps.meta.outputs.json }}") - echo "Tags to be used: $tags" - - # Loop through each digest and push the manifest - for digest in $(ls /tmp/digests); do - docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ - $tags \ - "${{ env.REGISTRY_IMAGE }}@sha256:${digest}" - done \ No newline at end of file + echo 'Meta output JSON: ${{ toJson(steps.meta.outputs.json) }}' + + docker buildx imagetools create \ + --annotation "org.opencontainers.image.authors=dvdksn" \ + $(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From f7b00b104cdd316665df6f133a4270088ccac5b3 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sun, 20 Oct 2024 14:38:11 +0530 Subject: [PATCH 18/22] Update build.yml --- .github/workflows/build.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d4803d..8e44878 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: platform: [ { docker: linux/amd64, guix: x86_64-linux }, { docker: linux/386, guix: i686-linux } - # Uncomment when issues are resolved + # TODO: # { docker: linux/arm/v7, guix: armhf-linux }, # Issue: Invalid argument # { docker: linux/arm64/v8, guix: aarch64-linux }, # Issue: Cannot allocate memory # { docker: linux/ppc64le, guix: powerpc64le-linux } @@ -47,9 +47,6 @@ jobs: type=ref,event=tag type=sha - - name: Debug meta JSON - run: echo "Meta JSON: ${{ steps.meta.outputs.json }}" - - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -133,8 +130,8 @@ jobs: working-directory: /tmp/digests run: | echo 'Meta output JSON: ${{ toJson(steps.meta.outputs.json) }}' - + docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ - $(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + --annotation "org.opencontainers.image.authors=dvdksn" \ + $(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 06a0c373f2ea18409f51448281cfd605b16d9d46 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sun, 20 Oct 2024 15:07:46 +0530 Subject: [PATCH 19/22] Update build.yml --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e44878..7093bec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,8 +130,12 @@ jobs: working-directory: /tmp/digests run: | echo 'Meta output JSON: ${{ toJson(steps.meta.outputs.json) }}' - + + # Parse the JSON string and extract tags + TAGS=$(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags[]' | xargs -I {} echo "--tag {}") + + # Create the manifest list docker buildx imagetools create \ --annotation "org.opencontainers.image.authors=dvdksn" \ - $(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \ + $TAGS \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 77f2046bae2910712162f87aaa131f7dd5eec6d4 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sun, 20 Oct 2024 15:33:48 +0530 Subject: [PATCH 20/22] Update build.yml --- .github/workflows/build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7093bec..8497242 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,12 +130,7 @@ jobs: working-directory: /tmp/digests run: | echo 'Meta output JSON: ${{ toJson(steps.meta.outputs.json) }}' - - # Parse the JSON string and extract tags TAGS=$(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags[]' | xargs -I {} echo "--tag {}") - - # Create the manifest list docker buildx imagetools create \ - --annotation "org.opencontainers.image.authors=dvdksn" \ $TAGS \ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From ddfc28ec9d6841ec141361cd995daa42abbc1eea Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Sun, 20 Oct 2024 15:36:48 +0530 Subject: [PATCH 21/22] Update build.yml --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8497242..95cc184 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,8 @@ jobs: working-directory: /tmp/digests run: | echo 'Meta output JSON: ${{ toJson(steps.meta.outputs.json) }}' - TAGS=$(echo '${{ toJson(steps.meta.outputs.json) }}' | jq -r '.tags[]' | xargs -I {} echo "--tag {}") + TAGS=$(echo '${{ steps.meta.outputs.json }}' | jq -r '.tags[]') + TAG_ARGS=$(echo "$TAGS" | sed 's/^/--tag /') docker buildx imagetools create \ - $TAGS \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + $TAG_ARGS \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) From 2abbd8a868c486fe6b4bae7e8dcc0bf6b6ba70c3 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Mon, 21 Oct 2024 00:11:23 +0530 Subject: [PATCH 22/22] Update build.yml --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95cc184..6993561 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,12 +5,11 @@ on: push: branches: - master - - feature/** tags: - 'v*.*.*' env: - REGISTRY_IMAGE: mryash/2.22 + REGISTRY_IMAGE: metacall/guix GUIX_VERSION: 1.4.0 BUILDKIT_VERSION: 0.13.0