I am trying to run within my github action a docker push since like to use the same image as part of different repos. The code I am using is the following:
docker build . --pull --rm --file "$GITHUB_WORKSPACE/${{ matrix.path }}/Dockerfile" --tag ${{ matrix.name }}
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
IMAGE_ID=ghcr.io/${{ github.repository }}/${{ matrix.name }}
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag ${{ matrix.name }} $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
The error I am getting is related to permissions:
denied: installation not allowed to Create organization package"
Any suggestion what is missing from my permissions.