Skip to content

Commit 8ec993d

Browse files
authored
Merge pull request #1 from huggingface/upstream-workflow
add workflow to rebase with upstream main nightly.
2 parents 73acebb + 4a4fdec commit 8ec993d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/upstream.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Rebase Upstream
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # This runs the job nightly at midnight UTC
6+
workflow_dispatch:
7+
pull_request:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
rebase:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout private repository
18+
uses: actions/checkout@v2
19+
with:
20+
ref: main
21+
22+
- name: Add upstream repository
23+
run: git remote add upstream https://github.com/huggingface/diffusers.git
24+
25+
- name: Fetch upstream changes
26+
run: git fetch upstream
27+
28+
- name: Rebase onto upstream main
29+
run: git rebase upstream/main
30+
31+
- name: Push changes to private main
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: |
35+
git push origin main --force

0 commit comments

Comments
 (0)