Having a GitHub workflow that pushes the image to ghcr.
The push fails on pull-requests with 403 forbidden using GITHUB_TOKEN.
- name: Build and push
uses: docker/build-push-action@v2
with:
context: setup/docker/base
file: setup/docker/base/Dockerfile
platforms: linux/amd64
push: ${{ steps.docker-vars.outputs.has-docker-secret == 'true' }}
tags: ${{ steps.docker-vars.outputs.tags }}
The permission are set to "write", is there a way to fix it or to let them push to their own ghcr url in pull-request?
The step should not be skipped.