forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (26 loc) · 957 Bytes
/
sync-main.yml
File metadata and controls
32 lines (26 loc) · 957 Bytes
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
# Sync upstream/main into your fork's main branch on a schedule or manually.
# Requires: your fork's workflow must be allowed to push to the branch (GITHUB_TOKEN can push if branch protection allows).
name: Sync upstream -> main (direct)
on:
schedule:
- cron: '0 */6 * * *' # every 6 hours, adjust as needed
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: GitHub sync main_clean
run: gh repo sync NVIDIA/pants --branch main_clean
- name: GitHub sync main
run: gh repo sync NVIDIA/pants --branch main