-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (27 loc) · 786 Bytes
/
sync.yml
File metadata and controls
31 lines (27 loc) · 786 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
name: sync
on:
workflow_dispatch:
schedule:
- cron: "2,7,12,17,22,27,32,37,42,47,52,57 * * * *"
push:
branches: [ sync ]
env:
LORE_EPOCH: 1
concurrency: sync
jobs:
repo-sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Partial clone
run: |
git clone --bare --depth=1 -b lore-$LORE_EPOCH --filter=blob:none https://github.com/$GITHUB_REPOSITORY .
- name: Update from lore.kernel.org
run: |
git fetch https://lore.kernel.org/git/$LORE_EPOCH refs/heads/master:refs/heads/lore-$LORE_EPOCH
- name: Push to mirror
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY lore-$LORE_EPOCH