mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 17:31:01 +01:00
Commit screenshots to a branch
This commit is contained in:
10
.github/workflows/screenshots.yml
vendored
10
.github/workflows/screenshots.yml
vendored
@@ -146,7 +146,7 @@ jobs:
|
||||
rsync --archive --checksum --itemize-changes "screenshots/screenshots-android-tenInchScreenshots/" fastlane/metadata/android/
|
||||
rsync --archive --checksum --itemize-changes "screenshots/screenshots-ios/" fastlane/metadata/ios/
|
||||
|
||||
- name: Commit screenshots to repository
|
||||
- name: Commit screenshots to a dated branch
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
@@ -156,7 +156,9 @@ jobs:
|
||||
if git diff --staged --quiet; then
|
||||
echo "No new or changed screenshots to commit."
|
||||
else
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
git commit -m "Update screenshots"
|
||||
git push origin HEAD:"${BRANCH}"
|
||||
BRANCH="screenshots-$(date -u +%Y-%m-%d)"
|
||||
git commit -m "Update screenshots"
|
||||
# Force-push so a same-day re-run replaces that day's branch
|
||||
git push --force origin HEAD:"${BRANCH}"
|
||||
echo "Pushed screenshots to branch ${BRANCH}"
|
||||
fi
|
||||
Reference in New Issue
Block a user