Skip to content

Collect

Collect #10

Workflow file for this run

name: Collect
# auto collection
on:
workflow_dispatch:
inputs:
date:
description: 'crawler date time'
required: true
schedule:
- cron: '0 15 * * *'
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 }}
- 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 }}:${{ secrets.CUSTOMS_GITHUB_TOKEN }}@github.com/${{ github.repository }}
git pull --rebase
git add .
git commit -m "Auto Update `date --rfc-3339=seconds`"
git push -f
- uses: actions/upload-artifact@v3
with:
name: github
path: github-*.json