Skip to content

Commit 354e74f

Browse files
committed
Add a scheduled GitHub workflow to keep this mirror up to date
Signed-off-by: Johannes Schindelin <[email protected]>
0 parents  commit 354e74f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/sync.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: sync
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "2,7,12,17,22,27,32,37,42,47,52,57 * * * *"
7+
8+
env:
9+
LORE_EPOCH: 1
10+
11+
jobs:
12+
repo-sync:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Partial clone
18+
run: |
19+
git clone --bare --filter=blob:none https://github.com/$GITHUB_REPOSITORY
20+
- name: Update from lore.kernel.org
21+
run: |
22+
git fetch https://lore.kernel.org/git/$LORE_EPOCH refs/heads/master:refs/heads/lore-$LORE_EPOCH
23+
- name: Push to mirror
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
git push https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY lore-$LORE_EPOCH

0 commit comments

Comments
 (0)