Skip to content

Commit dacc5fa

Browse files
author
Richard Top
committed
Fixed logic
1 parent 28661eb commit dacc5fa

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/test-software.eessi.io.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,17 @@ jobs:
3838
outputs:
3939
EESSI_VERSIONS: ${{ steps.detect.outputs.EESSI_VERSIONS }}
4040
steps:
41-
- name: Checkout code
42-
uses: actions/checkout@v4
41+
- name: Check out software-layer repository
42+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4343
with:
44-
fetch-depth: 0
45-
46-
- name: Get changed files (PR)
47-
run: |
48-
git fetch origin ${{ github.base_ref }}
49-
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
50-
echo "changed=$CHANGED_FILES" >> $GITHUB_OUTPUT
44+
fetch-depth: 0 # Fetch all history for all branches and tags
5145

5246
- name: Detect EESSI Versions
5347
- id: detect
5448
run: |
55-
# Detect changed files
56-
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
49+
# Get filenames changed between the PR branch and its base (e.g., main)
50+
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
51+
echo "files changed in the PR=$changed_files"
5752
5853
# Default to both EESSI versions if no specific match is found
5954
EESSI_VERSIONS='["2023.06", "2025.06"]'

0 commit comments

Comments
 (0)