Repository navigation
Reusable workflow to build and optionally publish docker images - #2
Conversation
reivilibre
left a comment
There was a problem hiding this comment.
Rest of it seems good to me
| - name: Build and push amd64 | ||
| uses: docker/build-push-action@v2 | ||
| with: | ||
| push: ${{ inputs.publish }} | ||
| labels: "gitsha1=${{ github.sha }}" | ||
| tags: "matrixdotorg/${{ inputs.image-name }}:${{ steps.set-tag.outputs.tag }}" | ||
| file: ${{ inputs.dockerfile }} | ||
| platforms: linux/amd64 | ||
|
|
||
| - name: Build and push arm64 | ||
| if: ${{ inputs.arm64 }} | ||
| uses: docker/build-push-action@v2 | ||
| with: | ||
| push: ${{ inputs.publish }} | ||
| labels: "gitsha1=${{ github.sha }}" | ||
| tags: "matrixdotorg/${{ inputs.image-name }}:${{ steps.set-tag.outputs.tag }}" | ||
| file: ${{ inputs.dockerfile }} | ||
| platforms: linux/arm64 |
There was a problem hiding this comment.
Have you tried this? I'm not 100% sure, but I think this means the ARM64 image will overwrite the tag for the AMD64 image.
Why not accept the list of platforms as an input? TBH though, I'd be happy to always produce the ARM64 image. It's gaining popularity, it's so easy for us to do, but so annoying for users of the packages when it's missing.
There was a problem hiding this comment.
Just caution. I don't want to give the impression that we support running all of our stuff on ARM unless we're all in agreement.
There was a problem hiding this comment.
Have you tried this?
Thanks for the pointer to allow a custom name. It works: https://hub.docker.com/r/dmrobertsonelement/sydent
(though it'd be snappier if there were more arm wheels)
e8f7b6b to
fdb0589
Compare
|
Testing this at matrix-org/sydent#492, which is now unhappy on the arm build. |
assuming utf-8
This matches the spelling of the org secrets
|
I think @reivilibre is out today. Would you mind taking a quick look at this @squahtx? Edit: (given the context on the sydent issue above) |
|
Looks good minus two questions. |
Thanks Sean Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Cribbed from Synapse's config.
After some back-and-forth, I decided to always build amd64 and arm64 to keep things simple.
If I'm following the recommended branch and tag system recommended for github actions, then I think I need to