Skip to content

Commit a304019

Browse files
Create sync-fork.yml
1 parent 4f93ba6 commit a304019

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/sync-fork.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sync Fork
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs daily at midnight UTC
6+
workflow_dispatch: # Allows manual trigger
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Sync with upstream
18+
run: |
19+
git remote add upstream https://github.com/observeinc/terraform-azure-collection.git
20+
git fetch upstream
21+
git checkout main
22+
git merge upstream/main --allow-unrelated-histories
23+
git push origin main
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)