From 3e50c2ed5b0c5278041036c597721d52facd74d3 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 8 Dec 2024 17:59:55 +0100 Subject: [PATCH] Support embedded tarballs for nightly release's artifacts. --- .github/workflows/NightlyRelease.yml | 23 +++++++++++++++++++++++ .github/workflows/_Checking_Nightly.yml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 079b60b9..c9471d46 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -68,6 +68,10 @@ on: description: 'Multi-line string containing artifact:file:title asset descriptions.' required: true type: string + tarball-name: + type: string + required: false + default: '__pyTooling_upload_artifact__.tar' jobs: Release: @@ -251,6 +255,25 @@ jobs: continue fi downloadedArtifacts[$artifact]=1 + + echo -n " Checking for embedded tarball ... " + if [[ -f "${artifact}/${{ inputs.tarball-name }}" ]]; then + echo -e "${ANSI_LIGHT_GREEN}[FOUND]${ANSI_NOCOLOR}" + + pushd "${artifact}" > /dev/null + + echo -n " Extracting embedded tarball ... " + tar -xf "${{ inputs.tarball-name }}" + if [[ $? -ne 0 ]]; then + echo -e "${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + fi + + popd > /dev/null + else + echo -e "${ANSI_LIGHT_YELLOW}[SKIPPED]${ANSI_NOCOLOR}" + fi fi # Check if artifact should be compressed (zip, tgz) or if asset was part of the downloaded artifact. diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml index fcc6f5f9..922981eb 100644 --- a/.github/workflows/_Checking_Nightly.yml +++ b/.github/workflows/_Checking_Nightly.yml @@ -32,7 +32,7 @@ jobs: echo "Program $(date --utc '+%d.%m.%Y - %H:%M:%S')" > program.py - name: 📤 Upload artifact - uses: pyTooling/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: other path: |