File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Scheduled Backup
1+ name : Backup Token Debug
22
33on :
4- schedule :
5- - cron : ' 0 2 * * 0' # Every Sunday at 2 AM UTC
64 workflow_dispatch :
75
86jobs :
9- backup :
7+ debug :
108 runs-on : ubuntu-latest
11-
129 steps :
13- - name : Checkout source repo
10+ - name : Checkout (for consistent runner env)
1411 uses : actions/checkout@v4
1512
1613 - name : Debug: is BACKUP_TOKEN set?
1916 run : |
2017 if [ -z "$API_TOKEN_GITHUB" ]; then
2118 echo "API_TOKEN_GITHUB is NOT set"
22- exit 1
19+ exit 0
2320 else
2421 echo "API_TOKEN_GITHUB is set"
2522 fi
3936 run : |
4037 curl -s -I -H "Authorization: token $API_TOKEN_GITHUB" https://api.github.com/user \
4138 | grep -i 'x-oauth-scopes' || true
42-
43- - name : Push to backup repo
44- uses : cpina/github-action-push-to-another-repository@v1
45- with :
46- api_token_github : ${{ secrets.BACKUP_TOKEN }}
47- source-directory : ' .'
48- destination-github-username : LennonLab
49- destination-repository-name : lennonlab.github.backup
50- user-email : backup@github.com
You can’t perform that action at this time.
0 commit comments