Skip to content

Commit

Permalink
feat: check if there are changes before updating db
Browse files Browse the repository at this point in the history
  • Loading branch information
boredland committed Feb 12, 2023
1 parent 900334c commit afdcea4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ runs:
cp -f /tmp/*-${arch}* $repo_dir || echo "no ${arch} files found"
cp -f /tmp/*-any* $repo_dir || echo "no any files found"
repo-add --sign --new --remove --prevent-downgrade $repo_dir/${{ inputs.name || github.event.repository.name }}.db.tar.gz $repo_dir/*.zst || echo "no files found for $arch"
if [[ `git status --porcelain` ]]; then
db_path="$repo_dir/${{ inputs.name || github.event.repository.name }}.db.tar.gz"
rm -f $db_path
repo-add --sign --new --remove --prevent-downgrade $repo_dir/${{ inputs.name || github.event.repository.name }}.db.tar.gz $repo_dir/*.zst || echo "no files found for $arch"
fi
done
rm -f docs/**/*.old* || echo 'no .old files found'
Expand Down

0 comments on commit afdcea4

Please sign in to comment.