File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,23 @@ jobs:
20
20
permissions :
21
21
contents : write
22
22
steps :
23
+ - name : check if update is needed
24
+ id : needs-update
25
+ run : |
26
+ set -x
27
+ source="$(git ls-remote "$SOURCE_REPOSITORY" master)" &&
28
+ target="$(git ls-remote https://github.com/"$TARGET_GITHUB_REPOSITORY" lore-$LORE_EPOCH)" &&
29
+ echo "result=$(test "${source%% *}" = "${target%% *}" && echo false || echo true)" >>$GITHUB_OUTPUT
23
30
- name : Partial clone
31
+ if : steps.needs-update.outputs.result == 'true'
24
32
run : |
25
33
git clone --bare --depth=1 -b lore-$LORE_EPOCH --filter=blob:none https://github.com/$TARGET_GITHUB_REPOSITORY .
26
34
- name : Update from lore.kernel.org
35
+ if : steps.needs-update.outputs.result == 'true'
27
36
run : |
28
37
git fetch "$SOURCE_REPOSITORY" refs/heads/master:refs/heads/lore-$LORE_EPOCH
29
38
- name : Push to mirror
39
+ if : steps.needs-update.outputs.result == 'true'
30
40
env :
31
41
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
42
run : |
You can’t perform that action at this time.
0 commit comments