From f68ff37e45ca3a317722e21a5a43fa3b269684d4 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 Aug 2024 11:52:33 -0600 Subject: [PATCH] check artifact exists --- .github/workflows/sample-action.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sample-action.yml b/.github/workflows/sample-action.yml index 1b36fd3..5e962be 100644 --- a/.github/workflows/sample-action.yml +++ b/.github/workflows/sample-action.yml @@ -10,14 +10,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: dowload-art + - name: check-artifact-exists + uses: LIT-Protocol/artifact-exists-action@v0 + with: + name: master_sha + - if: ${{steps.check-artifact-exists.outputs.exists}} + name: dowload-art uses: actions/download-artifact@v4 with: name: master_sha path: master_sha.txt - - - name: print_artifact_sha + - if: ${{steps.check-artifact-exists.outputs.exists}} + name: print-artifact run: | value=`cat master_sha.txt' echo "result: $value" - + - if: ${{ ! steps.check-artifact-exists.outputs.exists }} + run: echo "no artifact stored"