From af8c624b6a4fa12256cd9d09b1de1d865836d8c6 Mon Sep 17 00:00:00 2001 From: Max Kurapov Date: Mon, 9 Dec 2024 16:39:43 +0100 Subject: [PATCH] ci: create manifest list in release action --- .github/workflows/node-build.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index c6904c034a..39403a0b9e 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -266,7 +266,7 @@ jobs: push: false platforms: ${{ matrix.platform.arch }} file: packages/${{ matrix.package }}/Dockerfile.prod - tags: ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}:${{ needs.version-generator.outputs.version }} + tags: ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}-${{ matrix.platform.name }}:${{ needs.version-generator.outputs.version }} outputs: type=docker,dest=/tmp/${{ github.sha }}-${{ matrix.package }}-${{ matrix.platform.name }}-${{ needs.version-generator.outputs.version }}.tar - name: Save docker image to cache uses: actions/cache@v4 @@ -382,7 +382,28 @@ jobs: run: docker images - name: Push to registry run: | - docker push ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}:${{ needs.version-generator.outputs.version }} + docker push ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}-${{ matrix.platform.name }}:${{ needs.version-generator.outputs.version }} + + push-manifest: + name: Push multi-arch manifest file + needs: [version-generator, push] + runs-on: ubuntu-latest + if: needs.version-generator.outputs.dockerPush == 'true' + strategy: + matrix: + package: + - auth + - backend + - frontend + steps: + - name: Create manifest list + run: | + docker manifest create ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}:${{ needs.version-generator.outputs.version }} + --amend ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}-amd64:${{ needs.version-generator.outputs.version }} + --amend ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}-arm64:${{ needs.version-generator.outputs.version }} + - name: Push manifest list + run: | + docker manifest push ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}:${{ needs.version-generator.outputs.version }} generate-release: runs-on: ubuntu-latest @@ -397,6 +418,7 @@ jobs: with: token: ${{ github.token }} tag: ${{ needs.version-generator.outputs.version }} + includeRefIssues: false - name: Create Release uses: ncipollo/release-action@v1.14.0 with: