Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDS-1723] Fix images not being built on merge to base #208

Merged
merged 6 commits into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}