Skip to content

Commit fc89d07

Browse files
authored
Update versions of actions/download-artifact and actions/upload-artifact (#5)
* Update versions of actions/download-artifact and actions/upload-artifact * Update versions of actions/download-artifact and actions/upload-artifact * update artifact name * update download-artifact version
1 parent e76f11d commit fc89d07

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,28 @@ jobs:
5858
ccache -s
5959
fi
6060
61-
61+
- name: Sanitize artifact name
62+
id: sanitize
63+
# This step removes special characters from the artifact name to ensure compatibility with upload-artifact
64+
# Characters removed: " : < > | * ? \r \n \ /
65+
# Spaces are replaced with underscores
66+
# This sanitization prevents errors in artifact creation and retrieval
67+
shell: pwsh
68+
run: |
69+
$originalName = "Shell_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
70+
$artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
71+
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
72+
6273
- name: Create artifact
63-
uses: actions/upload-artifact@v2.2.4
74+
uses: actions/upload-artifact@v4.4.0
6475
with:
65-
name: Shell_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
76+
name: ${{ steps.sanitize.outputs.artifact_name }}
6677
path: ${{ env.WORKSPACE_INSTALL_PATH }}
6778

6879
- name: Install artifact
69-
uses: actions/download-artifact@v2
80+
uses: actions/download-artifact@v4.1.7
7081
with:
71-
name: Shell_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
82+
name: ${{ steps.sanitize.outputs.artifact_name }}
7283
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
7384

7485
deploy:
@@ -79,7 +90,7 @@ jobs:
7990
continue-on-error: true
8091
steps:
8192
- name: Get artifacts
82-
uses: actions/download-artifact@v2
93+
uses: actions/download-artifact@v4.1.7
8394
with:
8495
path: artifacts
8596

0 commit comments

Comments
 (0)