Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
-
1 - name: Update sites rating 1 + name: Update sites rating and statistics 2 2 3 3 on: 4 - push: 5 - branches: [ main ] 6 4 pull_request: 7 5 branches: [ main ] 6 + types: [opened, synchronize] 8 7 9 8 jobs: 10 9 build: 11 10 runs-on: ubuntu-latest 12 11 steps: 13 - - name: checkout repo 14 - uses: actions/checkout@v2 12 + - name: Checkout repository 13 + uses: actions/checkout@v2.3.2 14 + with: 15 + ref: ${{ github.event.pull_request.head.sha }} 16 + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. 17 + 15 18 - name: build application 16 19 run: | 17 20 pip3 install . 18 21 python3 ./utils/update_site_data.py --empty-only 19 22 23 + - name: Commit and push changes 24 + run: | 25 + git config --global user.name "Maigret autoupdate" 26 + git config --global user.email "[email protected]" 27 + 28 + echo `git name-rev ${{ github.event.pull_request.head.sha }} --name-only` 29 + 30 + export BRANCH=`git name-rev ${{ github.event.pull_request.head.sha }} --name-only | sed 's/remotes\/origin\///'` 31 + echo $BRANCH 32 + 33 + git remote -v 34 + git checkout $BRANCH 35 + 36 + git add sites.md 37 + git commit -m "Updated site list and statistics" 38 + 39 + git push origin $BRANCH 40 +