Enhancement (ci): Use separate workflow for PR docker builds

This is so the `docker` workflow status is not polluted with PR builds.
This commit is contained in:
Leonard Jonathan Oh 2023-11-23 22:44:01 +00:00
parent ee99590a63
commit 7183e2614e
3 changed files with 95 additions and 8 deletions

View file

@ -3,10 +3,7 @@ name: docker
on:
push:
tags:
- '**'
pull_request:
branches:
- master
- 'v2.*'
# This is needed to push to GitHub Container Registry. See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
permissions:
@ -31,12 +28,9 @@ jobs:
images: |
djmaze/snappymail
ghcr.io/${{ github.repository }}
# type=ref,event=pr generates tag(s) on PRs only. E.g. 'pr-123', 'pr-123-abc0123'
# type=ref,event=branch generates tag(s) on branch only. E.g. 'master', 'master-abc0123'
# type=ref,event=tag generates tag(s) on tags only. E.g. 'v0.0.0', 'v0.0.0-abc0123', and 'latest'
tags: |
type=ref,event=pr
type=ref,suffix=-{{sha}},event=pr
type=ref,event=branch
type=ref,event=tag
# The rest of the org.opencontainers.image.xxx labels are dynamically generated