From f0b10c43a58a550f488c960fa687b8fa8cee26e0 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Wed, 25 May 2022 12:11:17 +0200 Subject: [PATCH] ci(long-built): fix --- scripts/long-built/.built.sh | 10 +++++----- scripts/long-built/index.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/long-built/.built.sh b/scripts/long-built/.built.sh index ca9b812d..fa21ad02 100644 --- a/scripts/long-built/.built.sh +++ b/scripts/long-built/.built.sh @@ -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" diff --git a/scripts/long-built/index.ts b/scripts/long-built/index.ts index 92fa02ff..c781c126 100644 --- a/scripts/long-built/index.ts +++ b/scripts/long-built/index.ts @@ -82,7 +82,7 @@ const shell = async (commandLine: string, args?: Array, options?: ExecOp const mount = (directory: string): Array => ['--mount', `type=bind,source=${process.cwd()}/${directory},target=/mnt/${directory}`]; await core.group('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');