File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed
Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change 55 - cron : ' */30 * * * *'
66 workflow_dispatch :
77
8+ permissions :
9+ contents : write
10+
811jobs :
912 update-banned :
1013 runs-on : self-hosted
11-
1214 steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+ with :
18+ token : ${{ secrets.PUSH_PAT }}
19+ path : malicious_ips
20+
1321 - name : Run update script
14- run : |
15- echo "Running script.sh..."
16- bash ~/script.sh
22+ run : bash ~/script.sh
1723
1824 - name : Commit and push updated IP list
25+ working-directory : malicious_ips
1926 run : |
20- cd ~/malicious_ips
2127 git add malicious_ips.txt
22-
28+
2329 if git diff --staged --quiet; then
2430 echo "Nothing to update."
2531 exit 0
2632 fi
27-
28- git -c user.name='nixbear-actions' -c user.email='bot@srv.local' commit -m "Update banned IPs $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
29-
30- git remote set-url origin https://x-access-token:${{ secrets.PUSH_PAT }}@github.com/nixbear/malicious_ips.git
31- git push origin main
32-
33+
34+ git config user.name 'nixbear-actions'
35+ git config user.email ${{ secrets.GH_EMAIL }}
36+ git commit -m "Update banned IPs $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
37+ git push
You can’t perform that action at this time.
0 commit comments