Skip to content

Commit b93b042

Browse files
committed
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.
1 parent 44e5907 commit b93b042

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/dunedaq-develop-cpp-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ jobs:
7171
needs: Determine_image
7272
name: build_against_dev_on_${{ matrix.os_name }}
7373
runs-on: ubuntu-latest
74+
env:
75+
REPO: ${{ github.event.repository.name }}
7476
strategy:
7577
matrix:
7678
include:
@@ -122,8 +124,6 @@ jobs:
122124
run: |
123125
BRANCH="$CALLER_BRANCH"
124126
125-
export REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
126-
127127
cat << EOF > build_and_lint_package.sh
128128
#!/bin/bash
129129
@@ -188,6 +188,8 @@ jobs:
188188
if: ${{ inputs.caller_event_name == 'pull_request' }}
189189
needs: Build_against_dev_release
190190
runs-on: ubuntu-latest
191+
env:
192+
REPO: ${{ github.event.repository.name }}
191193
defaults:
192194
run:
193195
shell: bash
@@ -239,8 +241,8 @@ jobs:
239241
}
240242
241243
diff_file_name=linting_diff.txt
242-
pr_linting_results_file=$(find pull_request_linting/ -name "*_linting.log" | tail -n 1)
243-
nightly_linting_results_file=$(find nightly_linting/ -name "*_linting.log" | tail -n 1)
244+
pr_linting_results_file=$(find pull_request_linting/ -name "$REPO_linting.log" | tail -n 1)
245+
nightly_linting_results_file=$(find nightly_linting/ -name "$REPO_linting.log" | tail -n 1)
244246
245247
[[ -f "$pr_linting_results_file" ]] || echo "ERROR: No PR results file; exit 1"
246248
[[ -f "$nightly_linting_results_file" ]] || echo "ERROR: No nightly results file; exit 2"

0 commit comments

Comments
 (0)