File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,12 @@ jobs:
176176
177177 - name : Compress artifact
178178 if : ${{ always() }}
179- run : tar -czvf artifact.tar.gz $(ls | grep logs)
179+ run : |
180+ if compgen -G "logs*/" > /dev/null; then
181+ tar -czvf artifact.tar.gz logs*/
182+ else
183+ echo "No logs*/ found; skipping tar."
184+ fi
180185
181186 - name : Upload artifact
182187 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -247,7 +252,12 @@ jobs:
247252
248253 - name : Compress artifact
249254 if : ${{ always() }}
250- run : tar -czvf artifact.tar.gz $(ls | grep logs)
255+ run : |
256+ if compgen -G "logs*/" > /dev/null; then
257+ tar -czvf artifact.tar.gz logs*/
258+ else
259+ echo "No logs*/ found; skipping tar."
260+ fi
251261
252262 - name : Upload artifact
253263 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
You can’t perform that action at this time.
0 commit comments