Skip to content

Commit 35d731b

Browse files
committed
Use GH actions token instead of PAT
1 parent 948d23d commit 35d731b

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/cache.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
# GitHub username (owner of BOT_TOKEN, will be credited for updates)
9-
BOT_USER: lc-bot
9+
BOT_USER: github-actions[bot]
1010
# Paths used to store cloned repositories
1111
ACTION_REPO: thisrepo
1212
DATA_REPO: thisrepo
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030
with:
3131
path: ${{ env.ACTION_REPO }}
32-
token: ${{ secrets.BOT_TOKEN }}
32+
token: ${{ secrets.GITHUB_TOKEN }}
3333
- name: Setup python
3434
uses: actions/setup-python@v5
3535
with:
@@ -41,7 +41,7 @@ jobs:
4141
- name: Run cache script
4242
run: ./$ACTION_REPO/.github/scripts/cache.sh
4343
env:
44-
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
44+
BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
- name: Show health stats
4646
if: ${{ always() }}
4747
run: |

.github/workflows/update.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
# GitHub username (owner of BOT_TOKEN, will be credited for updates)
9-
BOT_USER: lc-bot
9+
BOT_USER: github-actions[bot]
1010
# Paths used to store cloned repositories
1111
ACTION_REPO: thisrepo
1212
DATA_REPO: thisrepo
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030
with:
3131
path: ${{ env.ACTION_REPO }}
32-
token: ${{ secrets.BOT_TOKEN }}
32+
token: ${{ secrets.GITHUB_TOKEN }}
3333
- name: Setup python
3434
uses: actions/setup-python@v5
3535
with:
@@ -41,7 +41,7 @@ jobs:
4141
- name: Run update script
4242
run: ./$ACTION_REPO/.github/scripts/update.sh
4343
env:
44-
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
44+
BOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
- name: Show health stats
4646
if: ${{ always() }}
4747
run: |
@@ -57,3 +57,13 @@ jobs:
5757
path: |
5858
${{ env.DATA_REPO }}/_visualize/LAST_MASTER_UPDATE.txt
5959
${{ env.DATA_REPO }}/_visualize/LAST_MASTER_UPDATE.log
60+
triggerBuild:
61+
name: Queue Pages Build
62+
runs-on: ubuntu-latest
63+
needs: [runDataUpdate]
64+
if: ${{ needs.runDataUpdate.result == 'success' }}
65+
steps:
66+
- run: gh api --method POST repos/$REPO/pages/builds
67+
env:
68+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
REPO: ${{ github.repository }}

0 commit comments

Comments
 (0)