Skip to content

Commit 59b121f

Browse files
Create auto-sync-upstream.yml
Created auto-sync Signed-off-by: theangrytech-git <[email protected]>
1 parent 08976cb commit 59b121f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Auto Sync with Upstream
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * 1' # Every Monday at 2:00 AM UTC
6+
workflow_dispatch: # Optional manual run
7+
8+
jobs:
9+
sync:
10+
name: Sync from microsoft/security-devops-action
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout forked repo
15+
uses: actions/checkout@v3
16+
with:
17+
token: ${{ secrets.GH_TOKEN }}
18+
fetch-depth: 0
19+
20+
- name: Set Git identity
21+
run: |
22+
git config user.name "angrytech-sync-bot"
23+
git config user.email "[email protected]"
24+
25+
- name: Add upstream and fetch
26+
run: |
27+
git remote add upstream https://github.com/microsoft/security-devops-action.git
28+
git fetch upstream
29+
git merge upstream/main --no-edit || true
30+
31+
- name: Push changes
32+
run: git push origin main

0 commit comments

Comments
 (0)