File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 - name : get public key id
4141 id : get-public-key-id
4242 env :
43- GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
43+ GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
4444 run : |
4545 public_key_id=$(bash get_public_key_id.sh ${{inputs.organization}})
4646 echo "PUBLIC_KEY_ID=$public_key_id" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -9,16 +9,14 @@ if [ -z "$ORGANIZATION" ]; then
99 echo " Usage: $0 <Organization name>"
1010 exit 1
1111fi
12-
1312# Making the API call and capturing the response
1413response=$( curl -sL \
1514 -H " Accept: application/vnd.github+json" \
1615 -H " Authorization: Bearer $GH_TOKEN " \
1716 -H " X-GitHub-Api-Version: 2022-11-28" \
1817 https://api.github.com/orgs/$ORGANIZATION /actions/secrets/public-key)
1918
20- echo $response
21- sleep 10
19+
2220# Checking if the request was successful (status code 200)
2321if [ ! -z " $response " ]; then
2422 # Extracting the public key from the response
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ response=$(curl -sL \
1717 -H " X-GitHub-Api-Version: 2022-11-28" \
1818 https://api.github.com/orgs/$ORGANIZATION /actions/secrets/public-key)
1919
20- echo $response
2120sleep 10
2221# Checking if the request was successful (status code 200)
2322if [ ! -z " $response " ]; then
You can’t perform that action at this time.
0 commit comments