File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 6
6
endpoint :
7
7
description : gh-federation lambda endpoint
8
8
required : true
9
+ repos :
10
+ description : gh-federation repositories
11
+ default : " "
9
12
10
13
runs :
11
14
using : " composite"
36
39
git config --global --add credential.helper store
37
40
echo $'protocol=https\nhost=github.com\nusername=x-access-token\npassword='"${GH_FEDERATION_ACCESS_TOKEN}"$'\n' | \
38
41
git credential-store store
42
+
43
+ - name : Store access token for repos as extraheader
44
+ if : inputs.repos != ''
45
+ shell : bash
46
+ env :
47
+ REPOS : ${{ inputs.repos }}
48
+ run : |
49
+ TOKEN=$(echo -n "x-access-token:${GH_FEDERATION_ACCESS_TOKEN}" | base64)
50
+ echo "::add-mask::${TOKEN}"
51
+ for repo in ${REPOS}; do
52
+ echo "config extraheader for ${repo}"
53
+ git config --global "http.${GITHUB_SERVER_URL}/${repo}.extraheader" "Authorization: Basic ${TOKEN}"
54
+ done
You can’t perform that action at this time.
0 commit comments