-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: skip pushing docker images if pull requests are sent from fork repositories #2328
Conversation
…positories #2326 (comment) The push of docker images failed because GitHub Actions tokens don't have the write permission if pull requests are sent from fork repositories.
@@ -25,6 +25,6 @@ jobs: | |||
- uses: docker/build-push-action@v5 | |||
with: | |||
context: . | |||
push: true | |||
push: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2328 +/- ##
=======================================
Coverage 87.88% 87.88%
=======================================
Files 455 455
Lines 55042 55042
=======================================
Hits 48375 48375
Misses 6667 6667 ☔ View full report in Codecov by Sentry. |
🤔 I'm not sure why the job failed. https://github.com/pen-lang/pen/actions/runs/8014083458/job/21892122367?pr=2328
|
Thanks for the change again!
Updating it fixed it! #2329 |
#2326 (comment)
The push of docker images failed because GitHub Actions tokens don't have the write permission if pull requests are sent from fork repositories.
So this pull request skip pushing docker images if pull requests are sent from fork repositories.
Test
The job passed.
https://github.com/pen-lang/pen/actions/runs/8014083453/job/21892121705?pr=2328#step:5:4