-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Allow Docker pushes on release branches #1568
Allow Docker pushes on release branches #1568
Conversation
@mre Could you review? Do you know if this will work as I've updated it here? Otherwise, it might be possible in a separate step to include the new logic, and set an environment variable to WDYT? |
.github/workflows/docker.yml
Outdated
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }} | ||
push: ${{ (github.event_name != 'pull_request' && | ||
github.actor != 'dependabot[bot]') || | ||
startsWith(github.ref_name, 'release-plz') }} |
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.
Looks good, but is the ref_name
for release-plz
documented somewhere? I was wondering if we should check for a tag name instead. 🤔
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.
@mre It's documented here: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context, but taking a closer look, it might not work for a pull request.
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.
@mre I've refactored this pull request. WDYT?
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.
@mre Did you want me to ask another maintainer to review?
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.
Oh, sorry for dropping the ball on this. 😅
697800c
to
f2ae4a7
Compare
Thanks for your contribution (and your patience), @eread. 🥳 |
@mre @thomas-zahner We got a run of the new logic: https://github.com/lycheeverse/lychee/actions/runs/12389086296/job/34581417146 It looks like Also, the Docker command was run with |
As outlined in #1432 (comment), the current workflow won't push to the Docker registry when a release is cut because releases now include a pull request.
This pull request increases the number of conditions under which a Docker image can be pushed.
Closes #1432.