Skip to content

Fetch from server #11075

Fetch from server

Fetch from server #11075

Workflow file for this run

name: Fetch from server
on:
schedule:
- cron: "10,40 * * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Config Github
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
- name: Just Do It
env:
PROXIES_URL: ${{ secrets.PROXIES_URL }}
run: |
timeout 10 curl -f "https://api.star-history.com/svg?repos=PuddinCat/BestClash&type=Date" > /tmp/stars.svg && mv /tmp/stars.svg .
curl $PROXIES_URL > proxies.yaml
ret=$?
length=$(wc -l < proxies.yaml)
if (( ret == 0 )) && (( length >= 10 )); then
git add . && git commit -m 'Update: '"$(date)" && git push || echo 'nothing to push'
else
echo error
fi