23
23
# This list is automatically updated - merged PRs are removed after successful runs
24
24
# To add new PRs: edit this line and add the PR numbers to the list
25
25
DEFAULT_PR_NUMBERS : ' 6346,6356,6376,6676,6735,6803,6824,6831,6860,6904,6912,6919,6928,6939,6965,6969'
26
+ # Token for authentication
27
+ GH_TOKEN : ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN || github.token }}
26
28
27
29
jobs :
28
30
pull-and-merge :
33
35
uses : actions/checkout@v4
34
36
with :
35
37
fetch-depth : 0
36
- token : ${{ secrets.PRS || github.token }} # Use PAT if available
38
+ token : ${{ env.GH_TOKEN }}
39
+ persist-credentials : true
40
+
41
+ - name : Verify authentication
42
+ run : |
43
+ # Check if PAT_TOKEN is available
44
+ if [ -n "${{ secrets.PAT_TOKEN }}" ]; then
45
+ echo "✓ PAT_TOKEN is configured"
46
+ else
47
+ echo "⚠ PAT_TOKEN not found, using default GITHUB_TOKEN"
48
+ echo "Note: Without PAT_TOKEN, the workflow cannot update itself"
49
+ fi
37
50
38
51
- name : Configure Git
39
52
run : |
@@ -44,14 +57,27 @@ jobs:
44
57
45
58
- name : Add upstream remote
46
59
run : |
60
+ # Add upstream without authentication (public repo)
47
61
git remote add upstream https://github.com/jellyfin/jellyfin-web.git || \
48
62
git remote set-url upstream https://github.com/jellyfin/jellyfin-web.git
63
+
64
+ # Fix origin URL to include authentication token
65
+ git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
49
66
50
67
- name : Fetch all remotes
51
68
run : |
69
+ echo "Current remotes:"
70
+ git remote -v
71
+
72
+ echo "Fetching from origin..."
52
73
git fetch origin
74
+
75
+ echo "Pulling from origin master..."
53
76
git pull origin master
77
+
78
+ echo "Fetching from upstream..."
54
79
git fetch upstream
80
+
55
81
echo "Fetched latest changes from all remotes"
56
82
57
83
- name : Merge upstream
0 commit comments