File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 4040 - name : Pull container image
4141 run : docker pull "${{env.CONTAINER_IMAGE}}"
4242
43-
43+ - name : Escape pull request title
44+ run : |
45+ import json
46+ import os
47+ import shlex
48+ with open('${{ github.event_path }}') as fh:
49+ event = json.load(fh)
50+ escaped = event['pull_request']['title']
51+ with open(os.environ['GITHUB_ENV'], 'a') as fh:
52+ print(f'PR_TITLE={escaped}', file=fh)
53+ shell : python3 {0}
54+
4455 - name : Run container
4556 run : |
4657 docker run -d --name "${{env.CONTAINER_NAME}}" $CONTAINER_IMAGE sleep infinity
8596 if : steps.check_changes.outcome != 'failure'
8697 run : |
8798 echo "--Running jenkins_api.py with input sha - $input_sha for pull request - $input_pr_url"
88- docker exec -e JENKINS_URL=${{secrets.CI_JENKINS_URL}} -e GITHUB_PAT=${{secrets.CI_GITHUB_TOKEN}} "${{env.CONTAINER_NAME}}" /bin/bash -c "python3 jenkins_api.py -s \"${JENKINS_URL}\" -jn \"${pipeline_name}\" -ghr \"${GITHUB_REPOSITORY}\" -ghsha \"${input_sha}\" -ghprn \"${input_pr_num}\" -ghpru \"${input_pr_url}\" -ghprt '${input_pr_title }' -ghpat=\"${svc_acc_org_secret}\""
99+ docker exec -e JENKINS_URL=${{secrets.CI_JENKINS_URL}} -e GITHUB_PAT=${{secrets.CI_GITHUB_TOKEN}} "${{env.CONTAINER_NAME}}" /bin/bash -c "python3 jenkins_api.py -s \"${JENKINS_URL}\" -jn \"${pipeline_name}\" -ghr \"${GITHUB_REPOSITORY}\" -ghsha \"${input_sha}\" -ghprn \"${input_pr_num}\" -ghpru \"${input_pr_url}\" -ghprt '${PR_TITLE }' -ghpat=\"${svc_acc_org_secret}\""
89100
90101 - name : Stop and remove container
91102 if : always()
You can’t perform that action at this time.
0 commit comments