Skip to content

Commit

Permalink
use gh for cross workflow again
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Feb 19, 2024
1 parent 6de4620 commit a464a47
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions restore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,20 @@ runs:
else
echo "::warning :: No stash found for key: ${{ inputs.key }}"
fi
- name: Download Stash from other workflow run
shell: bash
if: ${{ ! steps.check-stash.outputs.stash_exists == 'false' && steps.cross-repo.outputs.stash_name != ''}}
env:
GH_TOKEN: "${{ inputs.token }}"
STASH_NAME: "${{ steps.cross-repo.outputs.stash_name }}"
STASH_RUN_ID: "${{ steps.cross-repo.outputs.stash_run_id }}"
run: |
gh run download $STASH_RUN_ID --name $STASH_NAME --dir "${{ inputs.path }}"
- name: Download Stash
- name: Download Stash from current workflow run
if: ${{ steps.check-stash.outputs.stash_exists == 'true' }}
uses: actions/download-artifact@v4
with:
name: ${{ steps.check-stash.outputs.stash_name || steps.cross-repo.outputs.stash_name || inputs.key }}
name: ${{ steps.check-stash.outputs.stash_name || inputs.key }}
path: ${{ inputs.path }}
run-id: ${{ steps.cross-repo.outputs.stash_run_id || github.run_id}}

0 comments on commit a464a47

Please sign in to comment.