mirror of
https://github.com/venera-app/venera.git
synced 2025-12-15 06:41:14 +00:00
Fix alt_store workflow
This commit is contained in:
35
.github/workflows/update_alt_store.yml
vendored
35
.github/workflows/update_alt_store.yml
vendored
@@ -31,19 +31,30 @@ jobs:
|
|||||||
- name: Update AltStore source
|
- name: Update AltStore source
|
||||||
id: update_source
|
id: update_source
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
python update_alt_store.py
|
python update_alt_store.py
|
||||||
git config --global user.name 'GitHub Action'
|
git config --global user.name 'GitHub Action'
|
||||||
git config --global user.email 'action@github.com'
|
git config --global user.email 'action@github.com'
|
||||||
git add alt_store.json
|
git add alt_store.json
|
||||||
if git diff --staged --quiet; then
|
if git diff --staged --quiet; then
|
||||||
echo "changes=false" >> $GITHUB_OUTPUT
|
echo "changes=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
git commit -m "Updated source with latest release"
|
# Create a new branch for the PR
|
||||||
git push
|
branch_name="update-altstore-$(date +%Y%m%d-%H%M%S)"
|
||||||
echo "changes=true" >> $GITHUB_OUTPUT
|
git checkout -b "$branch_name"
|
||||||
fi
|
git commit -m "Updated source with latest release"
|
||||||
|
git push -u origin "$branch_name"
|
||||||
|
|
||||||
|
# Create PR using GitHub CLI
|
||||||
|
gh pr create \
|
||||||
|
--title "Update AltStore source with latest release" \
|
||||||
|
--body "This PR updates the alt_store.json file with the latest release information." \
|
||||||
|
--head "$branch_name" \
|
||||||
|
--base main
|
||||||
|
|
||||||
|
echo "changes=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Calculate job duration
|
- name: Calculate job duration
|
||||||
id: duration
|
id: duration
|
||||||
|
|||||||
Reference in New Issue
Block a user