diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 11540d0..ba32eb4 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,7 +13,7 @@ on: env: IMAGE_NAME: cyclops -jobs: +jobs: push: runs-on: ubuntu-latest if: github.event_name == 'push' @@ -27,15 +27,20 @@ jobs: - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 - + - name: Set short sha variable id: vars run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Log into GitHub Container Registry - # a PAT with `read:packages` and `write:packages` scopes is an Actions secret `CR_PAT`. - # Doesn't support Org or Repo level PATs and no bot accounts - run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ secrets.CR_PAT_USER }} --password-stdin + # Log in to GitHub Container registry + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + # a PAT with `read:packages` and `write:packages` scopes is an Actions secret `CR_PAT`. + # Doesn't support Org or Repo level PATs and no bot accounts + username: ${{ secrets.CR_PAT_USER }} + password: ${{ secrets.CR_PAT }} - name: Push image to GitHub Container Registry run: | @@ -54,8 +59,11 @@ jobs: echo VERSION=$VERSION for ARCH in amd64 arm64; do - docker buildx build -t $IMAGE_ID:$VERSION-$ARCH --platform=linux/${ARCH} --push . + # Disable provenance, as this causes issues when creating the manifest + # See https://github.com/atlassian-labs/cyclops/issues/56 + docker buildx build --provenance=false -t $IMAGE_ID:$VERSION-$ARCH --platform=linux/${ARCH} --push . done + docker manifest create $IMAGE_ID:$VERSION \ $(for ARCH in amd64 arm64; do echo $IMAGE_ID:$VERSION-$ARCH; done) docker manifest push $IMAGE_ID:$VERSION