Skip to content

Commit 6290d42

Browse files
committed
Merge branch 'main' into fix_tests
2 parents e3ec9ea + a5d01a1 commit 6290d42

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,29 @@ jobs:
5454
echo ${CCACHE_BASEDIR}
5555
ccache -s
5656
fi
57+
58+
- name: Sanitize artifact name
59+
id: sanitize
60+
# This step removes special characters from the artifact name to ensure compatibility with upload-artifact
61+
# Characters removed: " : < > | * ? \r \n \ /
62+
# Spaces are replaced with underscores
63+
# This sanitization prevents errors in artifact creation and retrieval
64+
shell: pwsh
65+
run: |
66+
$originalName = "Tearing_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
67+
$artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
68+
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
69+
5770
- name: Create artifact
58-
uses: actions/upload-artifact@v2
71+
uses: actions/upload-artifact@v4.4.0
5972
with:
60-
name: Tearing_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
73+
name: ${{ steps.sanitize.outputs.artifact_name }}
6174
path: ${{ env.WORKSPACE_INSTALL_PATH }}
6275

6376
- name: Install artifact
64-
uses: actions/download-artifact@v2
77+
uses: actions/download-artifact@v4.1.7
6578
with:
66-
name: Tearing_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
79+
name: ${{ steps.sanitize.outputs.artifact_name }}
6780
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
6881

6982
- name: Set env vars for tests
@@ -124,7 +137,7 @@ jobs:
124137
continue-on-error: true
125138
steps:
126139
- name: Get artifacts
127-
uses: actions/download-artifact@v2
140+
uses: actions/download-artifact@v4.1.7
128141
with:
129142
path: artifacts
130143

0 commit comments

Comments
 (0)