-
-
Notifications
You must be signed in to change notification settings - Fork 987
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI autoupdate * Updated site list and statistics
- Loading branch information
Showing
2 changed files
with
71 additions
and
4 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 |
---|---|---|
@@ -1,18 +1,36 @@ | ||
name: Update sites rating | ||
name: Update sites rating and statistics | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
|
||
- name: build application | ||
run: | | ||
pip3 install . | ||
python3 ./utils/update_site_data.py --empty-only | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "Maigret autoupdate" | ||
git config --global user.email "[email protected]" | ||
echo `git name-rev ${{ github.event.pull_request.head.sha }} --name-only` | ||
export BRANCH=`git name-rev ${{ github.event.pull_request.head.sha }} --name-only | sed 's/remotes\/origin\///'` | ||
echo $BRANCH | ||
git remote -v | ||
git checkout $BRANCH | ||
git add sites.md | ||
git commit -m "Updated site list and statistics" | ||
git push origin $BRANCH |
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