trigger-action #14
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
name: Altstore Update | |
on: | |
repository_dispatch: | |
types: [trigger-action] | |
jobs: | |
update_json: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Run script | |
run: | | |
python update_json.py | |
- name: Check for changes | |
id: check_changes | |
run: | | |
git diff --exit-code || echo "::set-output name=has_changes::true" | |
- name: Commit and push changes | |
if: steps.check_changes.outputs.has_changes == 'true' | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add . | |
git commit -m "Update JSON file with latest release" | |
git push | |