Skip to content

Commit 7716790

Browse files
committed
pipeline adjustment
1 parent 67a6445 commit 7716790

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

azure-pipelines.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ steps:
1919
inputs:
2020
secureFile: 'rp-azure-pipeline-github.pem'
2121
- bash: |
22-
# eval $(ruby -e "require 'openssl'; require 'jwt'; private_pem = File.read(ENV['GITHUB_PEM_PATH']); private_key = OpenSSL::PKey::RSA.new(private_pem); payload = { iat: Time.now.to_i - 60, exp: Time.now.to_i + (10 * 60), iss: ENV['GITHUB_APP_ID'] }; jwt = JWT.encode(payload, private_key, 'RS256'); puts 'PUSH_JWT='+jwt;")
23-
# TOKEN=$(curl -s -X POST \
24-
# -H "Authorization: Bearer $PUSH_JWT" \
25-
# -H "Accept: application/vnd.github.v3+json" \
26-
# https://api.github.com/app/installations/$GITHUB_APP_INSTALLATION_ID/access_tokens \
27-
# | jq -r '.token')
28-
# git remote add github https://x-access-token:$TOKEN@github.com/rocket-pool/$REPO_NAME
29-
# git fetch github
30-
# git push github HEAD:$(Build.SourceBranch) -f --verbose
31-
# git push github HEAD:$(Build.SourceBranch) -f --tags --verbose
22+
eval $(ruby -e "require 'openssl'; require 'jwt'; private_pem = File.read(ENV['GITHUB_PEM_PATH']); private_key = OpenSSL::PKey::RSA.new(private_pem); payload = { iat: Time.now.to_i - 60, exp: Time.now.to_i + (10 * 60), iss: ENV['GITHUB_APP_ID'] }; jwt = JWT.encode(payload, private_key, 'RS256'); puts 'PUSH_JWT='+jwt;")
23+
TOKEN=$(curl -s -X POST \
24+
-H "Authorization: Bearer $PUSH_JWT" \
25+
-H "Accept: application/vnd.github.v3+json" \
26+
https://api.github.com/app/installations/$GITHUB_APP_INSTALLATION_ID/access_tokens \
27+
| jq -r '.token')
28+
git remote add github https://x-access-token:$TOKEN@github.com/rocket-pool/$REPO_NAME
29+
git fetch github
30+
git push github HEAD:$(Build.SourceBranch) -f --verbose
31+
git push github HEAD:$(Build.SourceBranch) -f --tags --verbose
3232
displayName: 'Push to Github'
3333
env:
3434
GITHUB_PEM_PATH: $(githubPEM.secureFilePath)

0 commit comments

Comments
 (0)