Skip to content

Commit 6227107

Browse files
committed
use env vars
Signed-off-by: Peter St. John <pstjohn@nvidia.com>
1 parent be82602 commit 6227107

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/unit-tests-recipes.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,20 @@ jobs:
4848
recipes/**
4949
5050
- id: set-dirs
51+
name: Determine which directories to run
52+
env:
53+
EVENT_NAME: ${{ github.event_name }}
54+
PR_INFO: ${{ steps.get-pr-info.outputs.pr-info }}
55+
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
5156
run: |
5257
# Get all recipe and model directories
5358
ALL_DIRS=$(ls -d recipes/*/ models/*/ 2>/dev/null | jq -R -s -c 'split("\n")[:-1] | map(rtrimstr("/"))')
5459
5560
# Determine which directories to run: all for schedule, filtered for other events
56-
if [[ "${{ github.event_name }}" == "schedule" ]]; then
61+
if [[ "$EVENT_NAME" == "schedule" ]]; then
5762
DIRS=$(echo "$ALL_DIRS")
5863
else
5964
# Check if INCLUDE_ALL_RECIPES label is present
60-
PR_INFO='${{ steps.get-pr-info.outputs.pr-info }}'
6165
HAS_INCLUDE_ALL_LABEL=false
6266
if [[ "$PR_INFO" != "null" && "$PR_INFO" != "" ]]; then
6367
if echo "$PR_INFO" | jq -e '.labels[]? | select(.name == "INCLUDE_ALL_RECIPES")' > /dev/null 2>&1; then
@@ -69,7 +73,6 @@ jobs:
6973
if [[ "$HAS_INCLUDE_ALL_LABEL" == "true" ]]; then
7074
DIRS=$(echo "$ALL_DIRS")
7175
else
72-
CHANGED_FILES='${{ steps.changed-files.outputs.all_changed_files }}'
7376
# Filter directories to only those that have changed files
7477
DIRS=$(echo "$ALL_DIRS" | jq -c --argjson changed "$CHANGED_FILES" '
7578
map(select(. as $dir | $changed | index($dir) != null))

0 commit comments

Comments
 (0)