File tree Expand file tree Collapse file tree 2 files changed +44
-10
lines changed Expand file tree Collapse file tree 2 files changed +44
-10
lines changed Original file line number Diff line number Diff line change 11name : Updates for AI robots files
22on :
3- push :
4- branches :
5- - " main"
63 schedule :
74 - cron : " 0 0 * * *"
85
@@ -24,11 +21,10 @@ jobs:
2421 git --no-pager diff
2522 git add -A
2623 git diff --quiet && git diff --staged --quiet || (git commit -m "Update from Dark Visitors" && git push)
27-
28- echo "Updating robots.txt and table-of-bot-metrics.md if necessary ..."
29- python code/dark_visitors.py --convert
30- echo "... done."
31- git --no-pager diff
32- git add -A
33- git diff --quiet && git diff --staged --quiet || (git commit -m "Updated from new robots.json" && git push)
3424 shell: bash
25+ call-main :
26+ needs : dark-visitors
27+ uses : ./.github/workflows/main.yml
28+ secrets : inherit
29+ with :
30+ message : " Update from Dark Visitors"
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_call :
3+ inputs :
4+ message :
5+ type : string
6+ required : true
7+ description : The message to commit
8+ push :
9+ paths :
10+ - ' robots.json'
11+ branches :
12+ - " main"
13+
14+ jobs :
15+ ai-robots-txt :
16+ runs-on : ubuntu-latest
17+ name : ai-robots-txt
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 2
22+ - run : |
23+ git config --global user.name "ai.robots.txt"
24+ git config --global user.email "[email protected] " 25+ git log -1
26+ git status
27+ echo "Updating robots.txt and table-of-bot-metrics.md if necessary ..."
28+ python code/dark_visitors.py --convert
29+ echo "... done."
30+ git --no-pager diff
31+ git add -A
32+ if [ -n "${{ inputs.message }}" ]; then
33+ git commit -m "${{ inputs.message }}"
34+ else
35+ git commit -m "${{ github.event.head_commit.message }}"
36+ fi
37+ git push
38+ shell: bash
You can’t perform that action at this time.
0 commit comments