From e734b93346016d37262b4b6c95609b9018e88955 Mon Sep 17 00:00:00 2001 From: Gervasio Marchand Date: Sat, 15 Jul 2023 18:17:39 -0300 Subject: [PATCH] Push a manfiest to avoid the suffix --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55409ae..3b930f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,8 +37,35 @@ jobs: docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }} docker push ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} docker push ghcr.io/g3rv4/fakerelay:$version-${{ matrix.architecture }} + push-manifest: + runs-on: ubuntu-latest + needs: [ build ] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # get entire git tree, required for nerdbank gitversioning + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build manifest + shell: pwsh + run: | + Push-Location src + $version = (nbgv get-version -f json | ConvertFrom-Json).SimpleVersion + Write-Host "Version $version" + Pop-Location - if ('${{ matrix.architecture }}' -eq 'amd64') { - docker tag ghcr.io/g3rv4/fakerelay:latest-${{ matrix.architecture }} ghcr.io/g3rv4/fakerelay:latest - docker push ghcr.io/g3rv4/fakerelay:latest - } + docker manifest create ` + ghcr.io/g3rv4/fakerelay:latest ` + --amend ghcr.io/g3rv4/fakerelay:latest-amd64 ` + --amend ghcr.io/g3rv4/fakerelay:latest-arm64v8 + docker manifest create ` + ghcr.io/g3rv4/fakerelay:$version ` + --amend ghcr.io/g3rv4/fakerelay:$version-amd64 ` + --amend ghcr.io/g3rv4/fakerelay:$version-arm64v8 + docker manifest push ghcr.io/g3rv4/fakerelay:latest + docker manifest push ghcr.io/g3rv4/fakerelay:$version