ci(long-built): fix

This commit is contained in:
MedzikUser 2022-05-25 12:11:17 +02:00
parent 15f88d767b
commit f0b10c43a5
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
2 changed files with 6 additions and 6 deletions

View File

@ -13,6 +13,8 @@
# Outputs
# finished - build ended?
set -e -x
free_space() {
echo "::group::Stage: Free space on GitHub Runner..."
sudo rm -rf /usr/share/dotnet
@ -39,11 +41,7 @@ download_progress() {
upload_progress() {
echo "::group::Stage: Downloading progress artifact..."
SSHPASS="${SFTP_PASSWORD}" sshpass -e rsync -e ssh -avL "${SFTP_USER}@${SFTP_HOST}:${SFTP_CWD}/stage/" progress.tar.zst
echo "::endgroup::"
echo "::group::Stage: Moving progress archive into input directory..."
mv progress.tar.zst input
SSHPASS="${SFTP_PASSWORD}" sshpass -e rsync -e ssh -avL "${SFTP_USER}@${SFTP_HOST}:${SFTP_CWD}/stage/" progress/progress.tar.zst
echo "::endgroup::"
}
@ -80,6 +78,8 @@ if [ -z "$(ls -A output)" ]
then
# Directory is empty
echo "::set-output name=finished::false"
upload_progress
else
echo "Successfully built package"

View File

@ -82,7 +82,7 @@ const shell = async (commandLine: string, args?: Array<string>, options?: ExecOp
const mount = (directory: string): Array<string> => ['--mount', `type=bind,source=${process.cwd()}/${directory},target=/mnt/${directory}`];
await core.group<void>('Stage: Running docker container...', () =>
shell('docker', ['run', '-e', 'TIMEOUT=330', '-e', `BUILD_ARCH=${input.arch}`, ...mount('input'), ...mount('output'), ...mount('progress'), input.imageTag]));
shell('docker', ['run', '-e', 'TIMEOUT=300', '-e', `BUILD_ARCH=${input.arch}`, ...mount('input'), ...mount('output'), ...mount('progress'), input.imageTag]));
if (readdirSync('output').length !== 0) {
console.log('Stage: Successfully built package');