From 99d087c48506f0e12d34908d295baefe02c092bb Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Tue, 18 Nov 2025 13:19:07 -0700 Subject: [PATCH 1/5] only run ci on push to master and PRs to master --- .github/workflows/ats-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ats-ci.yml b/.github/workflows/ats-ci.yml index 294d50c25..319be5bcf 100644 --- a/.github/workflows/ats-ci.yml +++ b/.github/workflows/ats-ci.yml @@ -6,9 +6,12 @@ on: - '**' push: branches: - - '**' + - master tags-ignore: - ats-* + pull_request: + branches: + - master jobs: build: From ec4f729bf69a123de33635329f927b81322ef69b Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Tue, 18 Nov 2025 14:23:27 -0700 Subject: [PATCH 2/5] update ref GHA grabs on pull requests --- .github/workflows/ats-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ats-ci.yml b/.github/workflows/ats-ci.yml index 319be5bcf..d0a0af8bc 100644 --- a/.github/workflows/ats-ci.yml +++ b/.github/workflows/ats-ci.yml @@ -14,7 +14,7 @@ on: - master jobs: - build: + build: strategy: matrix: os: [ ubuntu-latest, ubuntu-24.04-arm ] @@ -31,7 +31,7 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - name: Does Amanzi branch of the same name exist? id: amanzi_branch run: | From 0541e3457c2f6f9259ac33a5a894c8a25eecc996 Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Tue, 18 Nov 2025 15:38:14 -0700 Subject: [PATCH 3/5] also apply new ref to testing step --- .github/workflows/ats-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ats-ci.yml b/.github/workflows/ats-ci.yml index d0a0af8bc..3ae9cf561 100644 --- a/.github/workflows/ats-ci.yml +++ b/.github/workflows/ats-ci.yml @@ -106,7 +106,7 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - name: Filter the branch name to generate a tag for Docker id: tag run: | @@ -141,7 +141,7 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV - name: Filter the branch name to generate a tag for Docker id: tag run: | From 508f13067c919aaa7ecc353bce184a3850b8dfab Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Tue, 18 Nov 2025 16:22:49 -0700 Subject: [PATCH 4/5] fix missing tag in manifest fix --- .github/workflows/ats-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ats-ci.yml b/.github/workflows/ats-ci.yml index 3ae9cf561..57c6879b5 100644 --- a/.github/workflows/ats-ci.yml +++ b/.github/workflows/ats-ci.yml @@ -172,7 +172,7 @@ jobs: - name: Filter the branch name to generate a tag for Docker id: tag run: | - echo "ATS_BRANCH_TAG=$(echo $GITHUB_REF_NAME | sed -e 's/\//--/g')" >> $GITHUB_ENV + echo "ATS_BRANCH_TAG=$(echo ${{ github.event.pull_request.head.ref }} | sed -e 's/\//--/g')" >> $GITHUB_ENV - name: Login to Docker Hub uses: docker/login-action@v3 with: From 6f270c57644b45431ae3bbda3ac86d01c4f146a4 Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Thu, 4 Dec 2025 12:46:14 -0700 Subject: [PATCH 5/5] fix ATS_BRANCH/ATS_BRANCH_TAG assignment based on github actions event --- .github/workflows/ats-ci.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ats-ci.yml b/.github/workflows/ats-ci.yml index 57c6879b5..6379b7064 100644 --- a/.github/workflows/ats-ci.yml +++ b/.github/workflows/ats-ci.yml @@ -31,7 +31,11 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + else + echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + fi - name: Does Amanzi branch of the same name exist? id: amanzi_branch run: | @@ -106,7 +110,11 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + else + echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + fi - name: Filter the branch name to generate a tag for Docker id: tag run: | @@ -141,7 +149,11 @@ jobs: id: branch working-directory: Docker run: | - echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "ATS_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + else + echo "ATS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV + fi - name: Filter the branch name to generate a tag for Docker id: tag run: | @@ -172,7 +184,11 @@ jobs: - name: Filter the branch name to generate a tag for Docker id: tag run: | - echo "ATS_BRANCH_TAG=$(echo ${{ github.event.pull_request.head.ref }} | sed -e 's/\//--/g')" >> $GITHUB_ENV + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "ATS_BRANCH_TAG=$(echo ${{ github.event.pull_request.head.ref }} | sed -e 's/\//--/g')" >> $GITHUB_ENV + else + echo "ATS_BRANCH_TAG=$GITHUB_REF_NAME | sed -e 's/\//--/g')" >> $GITHUB_ENV + fi - name: Login to Docker Hub uses: docker/login-action@v3 with: