From 42f1a1042827ac3266012bf4af16710c492d5170 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 7 Aug 2025 12:59:29 -0700 Subject: [PATCH 1/2] add push to main trigger for ctsm build --- .github/workflows/ctsm-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ctsm-build.yml b/.github/workflows/ctsm-build.yml index 36f8252..2dbc47f 100644 --- a/.github/workflows/ctsm-build.yml +++ b/.github/workflows/ctsm-build.yml @@ -5,6 +5,10 @@ on: # repository_dispatch: # types: [new-tag] workflow_dispatch: + push: + branches: [main] + paths: + - '.github/workflows/ctsm-build.yml' pull_request: branches: [main] paths: From 12167115f30ff9016879712e2ac27c7a45e91cdc Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 7 Aug 2025 13:05:44 -0700 Subject: [PATCH 2/2] add conditional statement to avoid pushing during pull requests to avoid the failing --- .github/workflows/ctsm-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ctsm-build.yml b/.github/workflows/ctsm-build.yml index 2dbc47f..6b3fd48 100644 --- a/.github/workflows/ctsm-build.yml +++ b/.github/workflows/ctsm-build.yml @@ -47,7 +47,7 @@ jobs: uses: docker/build-push-action@v6 with: context: ./unit-testing/ - push: true + push: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }} tags: ghcr.io/${{ env.REPO_NAME}}/unit-test-ctsm:latest cache-from: type=gha cache-to: type=gha,mode=max \ No newline at end of file