Skip to content

Commit 64cc9ed

Browse files
Refactor Github Action per b/485167538 (#14967)
This is a http://go/LSC run by http://go/ghss to automatically refactor your Github Actions per http://b/485167538. This is a PR to help you upgrade to the latest standards in Github Actions. Please merge this PR to accept the changes. NOTE: if you do not accept this PR, it may be force merged by the GHSS team. See http://b/485167538 for more details. Co-authored-by: Ben Knutson <benknutson@google.com>
1 parent 54da527 commit 64cc9ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/check_base_os.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
# Get the list of changed files compared to the target branch
3737
# and filter for unique directories under 'projects/'.
38-
CHANGED_DIRS=$(git diff --name-only ${{ github.base_ref }} ${{ github.head_ref }} | \
38+
CHANGED_DIRS=$(git diff --name-only ${GITHUB_BASE_REF} ${GITHUB_HEAD_REF} | \
3939
grep '^projects/' | \
4040
xargs -n 1 dirname | \
4141
sort -u)
@@ -53,9 +53,11 @@ jobs:
5353
if: steps.changed-projects.outputs.changed_dirs != ''
5454
run: |
5555
EXIT_CODE=0
56-
for project_dir in ${{ steps.changed-projects.outputs.changed_dirs }};
56+
for project_dir in ${STEPS_CHANGED_PROJECTS_OUTPUTS_CHANGED_DIRS};
5757
do
5858
echo "--- Checking ${project_dir} ---"
5959
python3 infra/ci/check_base_os.py "${project_dir}" || EXIT_CODE=$?
6060
done
6161
exit $EXIT_CODE
62+
env:
63+
STEPS_CHANGED_PROJECTS_OUTPUTS_CHANGED_DIRS: ${{ steps.changed-projects.outputs.changed_dirs }}

0 commit comments

Comments
 (0)