Skip to content

Commit 6000a6d

Browse files
JackLau1222github-actions[bot]
authored andcommitted
workflows: auto update (rebase) with upstream
Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
1 parent 5bb4219 commit 6000a6d

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/auto-rebase.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Auto Rebase"
2+
3+
on:
4+
schedule:
5+
# Run daily at 00:00 UTC
6+
- cron: '0 0 * * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
rebase:
14+
name: "Rebase from upstream FFmpeg"
15+
runs-on: ubuntu-22.04
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
branch: [master, workflows]
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ matrix.branch }}
25+
fetch-depth: 0
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Configure git
29+
run: |
30+
git config user.name "github-actions[bot]"
31+
git config user.email "github-actions[bot]@users.noreply.github.com"
32+
33+
- name: Add upstream remote
34+
run: git remote add upstream https://github.com/FFmpeg/FFmpeg.git
35+
36+
- name: Fetch upstream master
37+
run: git fetch upstream master
38+
39+
- name: Rebase on upstream master
40+
run: |
41+
set -euxo pipefail
42+
echo "Current branch: ${{ matrix.branch }}"
43+
echo "Current HEAD: $(git log --oneline -1)"
44+
git rebase upstream/master
45+
echo "New HEAD: $(git log --oneline -1)"
46+
47+
- name: Push changes
48+
run: git push origin ${{ matrix.branch }} --force-with-lease

0 commit comments

Comments
 (0)