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:
parent
5d5510b426
commit
4aff30ef5b
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -201,7 +201,7 @@ jobs:
|
|||||||
name: 'Create docker image'
|
name: 'Create docker image'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
@ -236,7 +236,6 @@ jobs:
|
|||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=semver,pattern={{version}}
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: push
|
id: push
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user