-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No need to create an extra step. Let's keep the PR creation part of the script step and conditionally create a PR if it's really necessary.
- Loading branch information
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,17 +22,18 @@ jobs: | |
echo "Images up to date" | ||
exit 0 | ||
else | ||
echo "New image" | ||
git diff | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git checkout -b update-images-$(date +%F) | ||
branchname="update-images-$(date +%F)" | ||
git checkout -b "${branchname}" | ||
git add debian/images.json | ||
git commit -m "Update images: $(date +%F)" | ||
git push | ||
git push origin "${branchname}" | ||
gh pr create -B main -H "${branchname}" \ | ||
--title 'Bump images.json' \ | ||
--body 'PR generated using scripts/update-images.py' | ||
fi | ||
- name: create pull request | ||
run: | | ||
gh pr create -B main -H update-images-$(date +%F) \ | ||
--title 'Bump images.json' \ | ||
--body 'PR generated using scripts/update-images.py' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |