Just build a ":dev" or ":main" Docker image on merge to these branches

Signed-off-by: Nabeel Shahzad <nabeelio@users.noreply.github.com>
This commit is contained in:
Nabeel Shahzad 2025-01-11 09:07:06 -06:00
parent 5d5510b426
commit 4aff30ef5b
No known key found for this signature in database

View File

@ -201,7 +201,7 @@ jobs:
name: 'Create docker image'
runs-on: ubuntu-latest
needs: [build]
if: github.repository == 'phpvms/phpvms' && github.event_name != 'pull_request'
if: github.repository == 'phpvms/phpvms' && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'))
permissions:
contents: read
packages: write
@ -236,7 +236,6 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Build and push
id: push