Repository navigation
Conversation
|
@dati18 sorry for being slow. Why do we need to tweak the permissions AND change the conditions that the workflow runs? Isn't the idea that if it's not pushing on the PR then the token it runs with will have less restrictions anyway? |
The permission change is not really needed, I added them to test |
| push: true | ||
| push: ${{ github.event_name != 'pull_request' }} |
There was a problem hiding this comment.
I would like to keep publishing images on pull_requests if possible as it makes it easier to test PRs in minikube if there is an image in the GHCR to pull.
How about only trying to push the image for PRs that aren't created by dependabot?
E.g. see option 1 of these github docs: https://docs.github.com/en/code-security/reference/supply-chain-security/troubleshoot-dependabot/dependabot-on-actions#troubleshooting-failures-when-dependabot-triggers-existing-workflows
Dependabot PR builds use a "read-only"
GITHUB_TOKEN, so publishing the image to GHCR fails even though the Docker build succeeds.contents: readandpackages: writepermissionNote: This PR is my a testing ground; no need to take it serious