mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: ignore missing files when creating archive (#3118)
* Reduce output noise from using 7zip * Ignore non existent files when creating archive --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
9c100a542c
commit
d0bab9eb08
2
.github/actions/artifact_download/action.yml
vendored
2
.github/actions/artifact_download/action.yml
vendored
@ -37,4 +37,4 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ${{ inputs.path }}
|
mkdir -p ${{ inputs.path }}
|
||||||
7zz x -p'${{ inputs.encryptionSecret }}' -t7z -o"${{ inputs.path }}" ${{ steps.tempdir.outputs.directory }}/archive.7z
|
7zz x -p'${{ inputs.encryptionSecret }}' -bso0 -bsp0 -t7z -o"${{ inputs.path }}" ${{ steps.tempdir.outputs.directory }}/archive.7z
|
||||||
|
11
.github/actions/artifact_upload/action.yml
vendored
11
.github/actions/artifact_upload/action.yml
vendored
@ -47,6 +47,7 @@ runs:
|
|||||||
something_exists=true
|
something_exists=true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create an archive if files exist.
|
# Create an archive if files exist.
|
||||||
# Don't create an archive file if no files are found
|
# Don't create an archive file if no files are found
|
||||||
# and warn.
|
# and warn.
|
||||||
@ -55,11 +56,15 @@ runs:
|
|||||||
echo "::warning:: No files/directories found with the provided path(s): ${paths}. No artifact will be uploaded."
|
echo "::warning:: No files/directories found with the provided path(s): ${paths}. No artifact will be uploaded."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for target in ${paths}
|
for target in ${paths}
|
||||||
do
|
do
|
||||||
pushd "$(dirname "${target}")" || exit 1
|
if [[ -f "${target}" ]]
|
||||||
7zz a -p'${{ inputs.encryptionSecret }}' -t7z -ms=on -mhe=on "${{ steps.tempdir.outputs.directory }}/archive.7z" "$(basename "${target}")"
|
then
|
||||||
popd || exit 1
|
pushd "$(dirname "${target}")" || exit 1
|
||||||
|
7zz a -p'${{ inputs.encryptionSecret }}' -bso0 -bsp0 -t7z -ms=on -mhe=on "${{ steps.tempdir.outputs.directory }}/archive.7z" "$(basename "${target}")"
|
||||||
|
popd || exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Upload archive as artifact
|
- name: Upload archive as artifact
|
||||||
|
Loading…
Reference in New Issue
Block a user