Noelware/docker-manifest-action

Allow multiple tags for base image

Closed this issue · 2 comments

It would be nice to be able to set multiple outputs for the base-image.

An example use-case would be tagging a final image as both latest and <sha hash>.

Something along the lines of:

      - name: Create and push manifest images
        uses: Noelware/docker-manifest-action@v0.2.3
        with:
          base-image: makeshift27015/nginx-alpine-amplify:b76a0d5602f583fb28d44d076c37818c9fdcc11d,makeshift27015/nginx-alpine-amplify:master,makeshift27015/nginx-alpine-amplify:latest
          extra-images: ${{ needs.vars.outputs.image_list }}
          push: true

My current workaround is to use regctl to retag after creating the manifest with your action (which is awesome, by the way!):

      - name: Retag
        run: |
          curl -sL https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64 >regctl
          chmod 755 regctl
          tags="${{ needs.vars.outputs.final_image_tags }}"
          IFS=",";for line in $tags; do
            echo "Retagging ${{ needs.vars.outputs.final_image_name }} to ${line}"
            ./regctl image copy ${{ needs.vars.outputs.final_image_name }} ${line}
          done

Sounds like a good feature to add! Would you be interested making a PR for this?

Sounds like a good feature to add! Would you be interested making a PR for this?

Just finishing up one now :) Will have it in when I've confirmed it works.