From 7612451e1664165a83840f7cd335e487c9e6d47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ch=C4=99ci=C5=84ski?= Date: Thu, 5 Sep 2024 17:05:43 +0200 Subject: [PATCH] Add outputs tests to download artifact action tests (#304) --- .github/workflows/test-download-artifacts.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/test-download-artifacts.yml b/.github/workflows/test-download-artifacts.yml index a3ddcce2..3a57e3ae 100644 --- a/.github/workflows/test-download-artifacts.yml +++ b/.github/workflows/test-download-artifacts.yml @@ -180,3 +180,38 @@ jobs: run: | cat artifact/sha echo $GITHUB_SHA + + download-outputs: + name: Download outputs should not be empty + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Download + id: download + uses: ./download-artifacts + with: + workflow: upload-test-artifacts.yml + + - name: Test artifact-build-commit + env: + _ARTIFACT_BUILD_COMMIT: ${{ steps.download.outputs.artifact-build-commit }} + run: | + ls -atlh + echo $_ARTIFACT_BUILD_COMMIT + if [[-z "$_ARTIFACT_BUILD_COMMIT"]]; then + echo "artifact-build-commit is empty" + exit 1 + fi + + - name: Test artifact-build-branch + env: + _ARTIFACT_BUILD_BRANCH: ${{ steps.download.outputs.artifact-build-branch }} + run: | + ls -atlh + echo $_ARTIFACT_BUILD_BRANCH + if [[-z "$_ARTIFACT_BUILD_BRANCH"]]; then + echo "artifact-build-branch is empty" + exit 1 + fi