Skip to content

Commit 48f9db7

Browse files
authored
Refactor backup workflow to debug token only
Removed scheduled backup job and adjusted token debug step.
1 parent ce4398d commit 48f9db7

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

.github/workflows/backup.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
name: Scheduled Backup
1+
name: Backup Token Debug
22

33
on:
4-
schedule:
5-
- cron: '0 2 * * 0' # Every Sunday at 2 AM UTC
64
workflow_dispatch:
75

86
jobs:
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?
@@ -19,7 +16,7 @@ jobs:
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
@@ -39,12 +36,3 @@ jobs:
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

0 commit comments

Comments
 (0)