Skip to content

Commit 02113ac

Browse files
authored
Only run on forked repo (#39)
1 parent b8bdce1 commit 02113ac

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

.claude/settings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/sync-fork.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ on:
44
schedule:
55
# Runs every minute (minimum interval for GitHub Actions cron)
66
# Note: GitHub Actions doesn't support intervals less than 1 minute
7-
- cron: '*/1 * * * *'
7+
- cron: "*/1 * * * *"
88
workflow_dispatch: # Allows manual triggering
99

1010
jobs:
1111
sync:
12+
if: github.repository == 'ShreyashSri/pbctf'
1213
runs-on: ubuntu-latest
1314
permissions:
1415
contents: write # Required to push to the repository
15-
16+
1617
steps:
1718
- name: Checkout repository
1819
uses: actions/checkout@v4
@@ -28,7 +29,7 @@ jobs:
2829
- name: Add upstream remote
2930
run: |
3031
UPSTREAM_REPO="https://github.com/pointblank-club/pbctf.git"
31-
32+
3233
# Check if upstream remote already exists
3334
if git remote | grep -q "^upstream$"; then
3435
git remote set-url upstream "$UPSTREAM_REPO"
@@ -46,10 +47,10 @@ jobs:
4647
- name: Merge upstream changes
4748
run: |
4849
CURRENT_BRANCH="${{ steps.branch.outputs.branch }}"
49-
UPSTREAM_BRANCH="prod" # Upstream default branch
50-
50+
UPSTREAM_BRANCH="staging" # Upstream default branch
51+
5152
git checkout $CURRENT_BRANCH
52-
53+
5354
# Try to merge from upstream branch
5455
if git merge "upstream/$UPSTREAM_BRANCH" --no-edit; then
5556
echo "Successfully merged upstream/$UPSTREAM_BRANCH into $CURRENT_BRANCH"

0 commit comments

Comments
 (0)