forked from benvinegar/counterscale
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 991 Bytes
/
update-fork.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update Fork
on:
schedule:
# This runs the workflow automatically every day at 05:55 AM UTC
- cron: "55 5 * * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main" # Ensures the 'main' branch is checked out
fetch-depth: 0 # Fetches all history for branch comparison
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Uses PAT to authenticate
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "nijamaDev"
- name: Add upstream remote
run: |
git remote add upstream https://github.com/benvinegar/counterscale
git fetch upstream
- name: Rebase with upstream
run: |
git checkout main
git rebase upstream/main
- name: Force push to main
run: |
git push origin main --force