Skip to content

sync job

sync job #617

Workflow file for this run

name: sync job
on:
schedule:
- cron: 0 * * * *
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: setup git
run: |
apt update && apt install -y jq
git config user.name ${GITHUB_ACTOR}
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
echo "old version: $(cat onlyfans.json | jq ".format" | cut -c2- | cut -d ":" -f 1)"
- name: update onlyfans.json
run: |
curl --retry 5 --retry-delay 30 "https://raw.githubusercontent.com/DIGITALCRIMINALS/dynamic-rules/main/onlyfans.json" > onlyfans.json
git add onlyfans.json
git diff-index --quiet HEAD || git commit -m "sync Version $(cat onlyfans.json | jq ".format" | cut -c2- | cut -d ":" -f 1)"
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}