Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(distrolist.yml): create only one branch per change #6577

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/distrolist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ jobs:
fi
echo "distlist_title=${title}" >> $GITHUB_ENV
echo "distlist_body=Automatically generated by CI" >> $GITHUB_ENV
echo "dl_date=$(date +'%Y-%m-%d/%H_%M_%S')" >> $GITHUB_ENV
dl_hash="$(echo -n "${title}" | sha256sum | cut -c1-8)"
if git ls-remote --heads origin | grep "update-distrolist-${dl_hash}"; then
echo "No changes to distrolist."
echo "changes_detected=false" >> $GITHUB_ENV
exit 0
fi
echo "dl_hash=${dl_hash}" >> $GITHUB_ENV

- name: Create PR if changes detected
if: env.changes_detected == 'true'
Expand All @@ -91,6 +97,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: distrolist
base: master
branch: update-distrolist-${{ env.dl_date }}
branch: update-distrolist-${{ env.dl_hash }}
title: ${{ env.distlist_title }}
body: ${{ env.distlist_body }}
Loading