File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2424 id : needs-update
2525 run : |
2626 set -x
27+ echo "org=${TARGET_GITHUB_REPOSITORY%%/*}" >>$GITHUB_OUTPUT &&
28+ echo "repo=${TARGET_GITHUB_REPOSITORY#*/}" >>$GITHUB_OUTPUT &&
2729 source="$(git ls-remote "$SOURCE_REPOSITORY" master)" &&
2830 target="$(git ls-remote https://github.com/"$TARGET_GITHUB_REPOSITORY" lore-$LORE_EPOCH)" &&
2931 echo "result=$(test "${source%% *}" = "${target%% *}" && echo false || echo true)" >>$GITHUB_OUTPUT
3537 if : steps.needs-update.outputs.result == 'true'
3638 run : |
3739 git fetch "$SOURCE_REPOSITORY" refs/heads/master:refs/heads/lore-$LORE_EPOCH
40+ - name : obtain installation token
41+ if : steps.needs-update.outputs.result == 'true'
42+ uses : actions/create-github-app-token@v2
43+ id : token
44+ with :
45+ app-id : ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
46+ private-key : ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
47+ owner : ${{ steps.needs-update.outputs.org }}
48+ repositories : ${{ steps.needs-update.outputs.repo }}
3849 - name : Push to mirror
3950 if : steps.needs-update.outputs.result == 'true'
4051 env :
41- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52+ GITHUB_TOKEN : ${{ steps.token.outputs.token }}
4253 run : |
4354 git push https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH
You can’t perform that action at this time.
0 commit comments