From b93b04283361fb35b80121ff1f9df5e617f447f2 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Tue, 14 Apr 2026 09:57:57 -0500 Subject: [PATCH 1/3] Improve linting file name specification Using wilcard expansion *_linting.log causes multiple files to be specified when this workflow is triggered by a PR that is part of correlated PRs across repos. Using $REPO_linting.log should avoid this. --- .github/workflows/dunedaq-develop-cpp-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dunedaq-develop-cpp-ci.yml b/.github/workflows/dunedaq-develop-cpp-ci.yml index a444fac..71582c2 100644 --- a/.github/workflows/dunedaq-develop-cpp-ci.yml +++ b/.github/workflows/dunedaq-develop-cpp-ci.yml @@ -71,6 +71,8 @@ jobs: needs: Determine_image name: build_against_dev_on_${{ matrix.os_name }} runs-on: ubuntu-latest + env: + REPO: ${{ github.event.repository.name }} strategy: matrix: include: @@ -122,8 +124,6 @@ jobs: run: | BRANCH="$CALLER_BRANCH" - export REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}') - cat << EOF > build_and_lint_package.sh #!/bin/bash @@ -188,6 +188,8 @@ jobs: if: ${{ inputs.caller_event_name == 'pull_request' }} needs: Build_against_dev_release runs-on: ubuntu-latest + env: + REPO: ${{ github.event.repository.name }} defaults: run: shell: bash @@ -239,8 +241,8 @@ jobs: } diff_file_name=linting_diff.txt - pr_linting_results_file=$(find pull_request_linting/ -name "*_linting.log" | tail -n 1) - nightly_linting_results_file=$(find nightly_linting/ -name "*_linting.log" | tail -n 1) + pr_linting_results_file=$(find pull_request_linting/ -name "$REPO_linting.log" | tail -n 1) + nightly_linting_results_file=$(find nightly_linting/ -name "$REPO_linting.log" | tail -n 1) [[ -f "$pr_linting_results_file" ]] || echo "ERROR: No PR results file; exit 1" [[ -f "$nightly_linting_results_file" ]] || echo "ERROR: No nightly results file; exit 2" From d0b3869eca06f9565733163dd3df31e8dfea8420 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Tue, 14 Apr 2026 11:32:13 -0500 Subject: [PATCH 2/3] Fix variable expansion --- .github/workflows/dunedaq-develop-cpp-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dunedaq-develop-cpp-ci.yml b/.github/workflows/dunedaq-develop-cpp-ci.yml index 71582c2..14d3843 100644 --- a/.github/workflows/dunedaq-develop-cpp-ci.yml +++ b/.github/workflows/dunedaq-develop-cpp-ci.yml @@ -241,8 +241,8 @@ jobs: } diff_file_name=linting_diff.txt - pr_linting_results_file=$(find pull_request_linting/ -name "$REPO_linting.log" | tail -n 1) - nightly_linting_results_file=$(find nightly_linting/ -name "$REPO_linting.log" | tail -n 1) + pr_linting_results_file=$(find pull_request_linting/ -name "${REPO}_linting.log" | tail -n 1) + nightly_linting_results_file=$(find nightly_linting/ -name "${REPO}_linting.log" | tail -n 1) [[ -f "$pr_linting_results_file" ]] || echo "ERROR: No PR results file; exit 1" [[ -f "$nightly_linting_results_file" ]] || echo "ERROR: No nightly results file; exit 2" From 7009899eeb0508a397dd1568cc921fea12b469a0 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Tue, 14 Apr 2026 14:06:32 -0500 Subject: [PATCH 3/3] Increase scope of REPO variable --- .github/workflows/dunedaq-develop-cpp-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/dunedaq-develop-cpp-ci.yml b/.github/workflows/dunedaq-develop-cpp-ci.yml index 14d3843..e46d6dd 100644 --- a/.github/workflows/dunedaq-develop-cpp-ci.yml +++ b/.github/workflows/dunedaq-develop-cpp-ci.yml @@ -14,6 +14,7 @@ on: env: CALLER_BRANCH: ${{ github.head_ref || github.ref_name }} TARGET_BRANCH: ${{ github.base_ref || github.ref_name }} + REPO: ${{ github.event.repository.name }} jobs: Should_run: @@ -71,8 +72,6 @@ jobs: needs: Determine_image name: build_against_dev_on_${{ matrix.os_name }} runs-on: ubuntu-latest - env: - REPO: ${{ github.event.repository.name }} strategy: matrix: include: @@ -188,8 +187,6 @@ jobs: if: ${{ inputs.caller_event_name == 'pull_request' }} needs: Build_against_dev_release runs-on: ubuntu-latest - env: - REPO: ${{ github.event.repository.name }} defaults: run: shell: bash