Skip to content

Collect

Collect #1007

Workflow file for this run

name: Collect
# auto collection
on:
workflow_dispatch:
inputs:
date:
description: 'crawler date time'
required: true
token:
description: 'select token'
required: true
# schedule:
# - cron: '0 17 * * *'
jobs:
collect-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Set up Python
with:
python-version: '3.10'
- name: Prepare
run: pip3 install -r requirement.txt
- name: Crawler
run: python3 main.py ${{ secrets.CUSTOMS_GITHUB_TOKEN }} ${{ inputs.date }} ${{ inputs.token }}
- name: Upload Repos
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Action"
git remote set-url origin https://${{ github.actor }}:$(echo "${{ secrets.CUSTOMS_GITHUB_TOKEN }}" | cut -d ',' -f 1)@github.com/${{ github.repository }}
git pull --rebase
git add .
git commit -m "Auto Update `date --rfc-3339=seconds`"
git push -f
curl https://mtigd2.laf.run/transfer_next\?token\=${{ inputs.token }}\&date\=${{ inputs.date }}