Skip to content

Commit

Permalink
[DDS-1723] Fix images not being built on merge to base (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
GROwen authored Oct 17, 2023
1 parent 44802bf commit 6cae0a0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
schedule:
- cron: '23 20 * * 0'
workflow_dispatch:
push:
pull_request:
branches:
- 'build/**'
- '5.x'
pull_request_target:
types:
- closed
Expand All @@ -15,7 +15,7 @@ env:
REGISTRY: ghcr.io
jobs:
buildx:
if: github.event.pull_request.merged == true || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/build/')) || contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name)
if: github.event.pull_request.merged == true || contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) || github.event_name == 'pull_request' && startsWith(github.head_ref,'build/')
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -43,7 +43,9 @@ jobs:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}
tags: |
type=ref,event=pr
type=ref,event=branch
type=raw,value={{github.event.pull_request.head.ref}},enable=${{ github.event.pull_request.merged == true }}
labels: |
maintainer=Digital Victoria
repository=${{ github.repositoryUrl }}
Expand All @@ -60,4 +62,5 @@ jobs:
./gh-actions-bake.hcl
${{ steps.meta.outputs.bake-file }}
# Target the default group - probably unnecessary.
# Target the default group - branchobably unnecessary.
targets: ${{ matrix.images }}

0 comments on commit 6cae0a0

Please sign in to comment.