Skip to content

Commit

Permalink
CI Load action: removed directory if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancepillois committed Mar 3, 2025
1 parent 9f56b08 commit bd5321f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/actions/load/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ runs:
ITEM_PATH="${{ inputs.root }}/${{ inputs.key }}"
echo "dest=$ITEM_PATH" >> $GITHUB_OUTPUT
if [[ -d ${{ inputs.path }} ]]; then
if [[ ${{ inputs.repository == 'liangan1/pytorch' }} ]]; then
rm -rf ${{ inputs.path }}
else
echo "Directory ${{ inputs.path }} exists and will not be restored from cache"
exit 1
fi
echo "Directory ${{ inputs.path }} already exists and will not be removed"
rm -rf ${{ inputs.path }}
fi
if [[ ${{ inputs.enabled == 'true' }} && -d $ITEM_PATH ]]; then
echo "Cache hit for ${{ inputs.key }}"
Expand Down

0 comments on commit bd5321f

Please sign in to comment.