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:
2020 permissions :
2121 contents : write
2222 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
2330 - name : Partial clone
31+ if : steps.needs-update.outputs.result == 'true'
2432 run : |
2533 git clone --bare --depth=1 -b lore-$LORE_EPOCH --filter=blob:none https://github.com/$TARGET_GITHUB_REPOSITORY .
2634 - name : Update from lore.kernel.org
35+ if : steps.needs-update.outputs.result == 'true'
2736 run : |
2837 git fetch "$SOURCE_REPOSITORY" refs/heads/master:refs/heads/lore-$LORE_EPOCH
2938 - name : Push to mirror
39+ if : steps.needs-update.outputs.result == 'true'
3040 env :
3141 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3242 run : |
You can’t perform that action at this time.
0 commit comments