Skip to content

Commit

Permalink
Account for no changes in previous step for scheduled_update.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmock committed Aug 21, 2024
1 parent bd895f3 commit c42306d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/scheduled_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ jobs:
- run: |
gh repo sync
tag=$(git describe --tags --abbrev=0) || release_needed="true"
for file in $(git diff ${tag}..${{ needs.update.outputs.sha }} --name-only); do
sha=${{ needs.update.outputs.sha }}
if [ -z "${sha}" ]; then sha="HEAD"; fi
for file in $(git diff ${tag}..${sha} --name-only); do
if [ $file == "taginfo.json" ] || [ $file == "index.json" ] || [ $file == "package.json"] ; then
release_needed="true"
break
fi
done
if [ $release_needed == "true" ]; then
tag=$(jq -r '.version' package.json)
object=$(git rev-parse --verify ${{ needs.update.outputs.sha }})
object=$(git rev-parse --verify ${sha})
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/git/tags \
--field "tag=${tag}" \
Expand Down

0 comments on commit c42306d

Please sign in to comment.