-
Notifications
You must be signed in to change notification settings - Fork 36
Correct syntax in docker.yaml workflow #159
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
Conversation
a1cee1f
to
231e44a
Compare
`exit 0` does not bail out early it seems: https://github.com/matrix-org/rust-synapse-compress-state/actions/runs/16961790179/job/48076133728 We have to individually skip every step instead.
latest=false | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | ||
type=sha,prefix=,format=long |
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.
I'm confused how/why we can't see the failures from #158 ?
Do we need to require some jobs succeed in order to notice this?
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.
Good point - indeed it looks like we do. I've added a ruleset that requires all CI checks complete -> https://github.com/matrix-org/rust-synapse-compress-state/settings/rules/7412288
And now we can see that build
is not passing on #160 (as this PR hasn't merged yet). Whereas before it was just completely green.
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.
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.
Indeed, and I wish you could just click on "build" there instead of needing to go to the Checks tab and clicking on the workflow. But it's a strong signal at the very least.
We were failing to push cached images to the registry, because we're no longer logging to the GHCR. In addition, secrets.GITHUB_TOKEN would need to be expanded to support writing to the container registry, and giving that to arbitrary PRs isn't great. The GitHub Actions build cache is auto-clearing after 7 days, and requires no auth.
Taken from #160, so the action knows what the 'gha' backend is.
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache | ||
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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.
@MadLittleMods a few small final changes to get the build to pass (https://github.com/matrix-org/rust-synapse-compress-state/actions/runs/16971244752/job/48108531585?pr=159#step:6:725)
This broke very quietly in #158 (See https://github.com/matrix-org/rust-synapse-compress-state/actions/runs/16938635005). So the first commit fixes the syntax.
The second commit changes the solution completely, as apparently
exit 0
will not skip the rest of the job. Instead, we need to do a bunch ofif
s.