Skip to content

Commit 7612451

Browse files
Add outputs tests to download artifact action tests (#304)
1 parent b7a9750 commit 7612451

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/test-download-artifacts.yml

+35
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,38 @@ jobs:
180180
run: |
181181
cat artifact/sha
182182
echo $GITHUB_SHA
183+
184+
download-outputs:
185+
name: Download outputs should not be empty
186+
runs-on: ubuntu-22.04
187+
steps:
188+
- name: Checkout
189+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
190+
191+
- name: Download
192+
id: download
193+
uses: ./download-artifacts
194+
with:
195+
workflow: upload-test-artifacts.yml
196+
197+
- name: Test artifact-build-commit
198+
env:
199+
_ARTIFACT_BUILD_COMMIT: ${{ steps.download.outputs.artifact-build-commit }}
200+
run: |
201+
ls -atlh
202+
echo $_ARTIFACT_BUILD_COMMIT
203+
if [[-z "$_ARTIFACT_BUILD_COMMIT"]]; then
204+
echo "artifact-build-commit is empty"
205+
exit 1
206+
fi
207+
208+
- name: Test artifact-build-branch
209+
env:
210+
_ARTIFACT_BUILD_BRANCH: ${{ steps.download.outputs.artifact-build-branch }}
211+
run: |
212+
ls -atlh
213+
echo $_ARTIFACT_BUILD_BRANCH
214+
if [[-z "$_ARTIFACT_BUILD_BRANCH"]]; then
215+
echo "artifact-build-branch is empty"
216+
exit 1
217+
fi

0 commit comments

Comments
 (0)