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 24
24
id : needs-update
25
25
run : |
26
26
set -x
27
+ echo "org=${TARGET_GITHUB_REPOSITORY%%/*}" >>$GITHUB_OUTPUT &&
28
+ echo "repo=${TARGET_GITHUB_REPOSITORY#*/}" >>$GITHUB_OUTPUT &&
27
29
source="$(git ls-remote "$SOURCE_REPOSITORY" master)" &&
28
30
target="$(git ls-remote https://github.com/"$TARGET_GITHUB_REPOSITORY" lore-$LORE_EPOCH)" &&
29
31
echo "result=$(test "${source%% *}" = "${target%% *}" && echo false || echo true)" >>$GITHUB_OUTPUT
35
37
if : steps.needs-update.outputs.result == 'true'
36
38
run : |
37
39
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 }}
38
49
- name : Push to mirror
39
50
if : steps.needs-update.outputs.result == 'true'
40
51
env :
41
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
+ GITHUB_TOKEN : ${{ steps.token.outputs.token }}
42
53
run : |
43
54
git push https://$GITHUB_ACTOR:[email protected] /$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH
You can’t perform that action at this time.
0 commit comments