Sync Script #117422
This file contains hidden or 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: Sync Script | |
| on: | |
| schedule: | |
| - cron: "*/5 * * * *" | |
| workflow_dispatch: | |
| jobs: | |
| sched-job-0: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.8' | |
| - uses: tj-actions/puppeteer@v4 | |
| id: puppeteer | |
| with: | |
| files: | | |
| main.js | |
| - name: Test | |
| run: | | |
| docker cp ${{ steps.puppeteer.outputs.container-id }}:${{ steps.puppeteer.outputs.home }}/0.txt 0.txt | |
| docker cp ${{ steps.puppeteer.outputs.container-id }}:${{ steps.puppeteer.outputs.home }}/1.txt 1.txt | |
| ls -alh | |
| - name: Download | |
| run: | | |
| rm -f gg.js | |
| wget https://ltn.gold-usergeneratedcontent.net/gg.js --header "referer: https://hitomi.la/" | |
| python3 sync.py | |
| - name: A | |
| run: | | |
| git config --local user.email "violet@violet.com" | |
| git config --local user.name "violet-bot" | |
| git config --global pull.rebase false | |
| git add gg.js | |
| git add hitomi_get_image_list_v3.js | |
| git commit -m "update gg" | |
| git pull | |
| - name: Push | |
| uses: ad-m/github-push-action@master | |
| with: | |
| branch: 'main' | |
| github_token: $ |