-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from asaldele1/main
Add gsmarena GH action
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Gsmarena job | ||
|
||
on: | ||
push: | ||
branches: [ gsmarena ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: gsmarena | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Run | ||
run: python3 gsmarena.py | ||
|
||
- name: Commit and push if changed | ||
run: | | ||
git config --local user.email "xiaomifirmwareupdater@gmail.com" | ||
git config --local user.name "XiaomiFirmwareUpdater" | ||
git add devices.json all/*.json | ||
git diff --quiet && git diff --staged --quiet || git commit -m "Sync: $(date +%d.%m.%Y) [skip ci]" | ||
git push origin HEAD |