name: Daily on: schedule: - cron: "0 22 * * *" workflow_dispatch: push: branches: - main permissions: contents: write pull-requests: write jobs: run-commands1: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "22" - name: Commit Setup run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "GitHub Action" - name: Install dependencies run: npm install - name: Download JSON and save response env: JSON_URL: "https://raw.githubusercontent.com/fa0311/TwitterInternalAPIDocument/refs/heads/develop/docs/json/ScriptLoadJson.json" run: curl -s $JSON_URL | jq -r '.["ondemand.s"]' | xargs curl -s -o source/a.js - name: Run deobfuscation scripts run: | echo "Update deobfuscation" >> commit-message-wip if git diff --quiet; then echo "No changes source file" >> commit-message-wip else echo "Changes detected in source file" >> commit-message-wip fi if npm run run:base; then echo "run:base succeeded" >> commit-message-wip else echo "run:base failed" >> commit-message-wip fi if npm run run:fork; then echo "run:fork succeeded" >> commit-message-wip else echo "run:fork failed" >> commit-message-wip fi if npm run run:additional; then echo "run:additional succeeded" >> commit-message-wip else echo "run:additional failed" >> commit-message-wip fi - name: Commit results run: | if git diff --quiet; then echo "No changes to commit." else git add . git commit -F commit-message-wip git push origin main fi