Skip to content

Commit 25b6992

Browse files
committed
ci: only push Docker image on main branch, use :latest tag
Build always runs for validation, but push only happens on main. IaC updated to pull :latest tag which main branch publishes.
1 parent 78e5358 commit 25b6992

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
with:
7171
context: cloudformation/scenarios/localgov-drupal
7272
file: cloudformation/scenarios/localgov-drupal/docker/Dockerfile
73-
push: ${{ github.event_name != 'pull_request' && (github.event.inputs.push_image != 'false') }}
73+
push: ${{ github.ref == 'refs/heads/main' && github.event.inputs.push_image != 'false' }}
7474
tags: ${{ steps.meta.outputs.tags }}
7575
labels: ${{ steps.meta.outputs.labels }}
7676
cache-from: type=gha

cloudformation/scenarios/localgov-drupal/cdk/lib/constructs/compute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export class ComputeConstruct extends Construct {
275275

276276
// Add container - pull from GitHub Container Registry
277277
const container = taskDefinition.addContainer('drupal', {
278-
image: ecs.ContainerImage.fromRegistry('ghcr.io/co-cddo/ndx_try_aws_scenarios-localgov_drupal:fix-menu-links-search-index'),
278+
image: ecs.ContainerImage.fromRegistry('ghcr.io/co-cddo/ndx_try_aws_scenarios-localgov_drupal:latest'),
279279
logging: ecs.LogDrivers.awsLogs({
280280
logGroup: this.logGroup,
281281
streamPrefix: 'drupal',

0 commit comments

Comments
 (0)