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