Skip to content

Commit

Permalink
automatically sync fork
Browse files Browse the repository at this point in the history
  • Loading branch information
nijamaDev committed Jun 24, 2024
1 parent 117df5c commit 8b7dee5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update Fork

on:
schedule:
# This runs the workflow automatically every monday at 05:55 AM UTC
- cron: "55 5 * * 1"

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

0 comments on commit 8b7dee5

Please sign in to comment.