@@ -480,23 +480,19 @@ jobs:
480480 diff default.pgo old_profile.pgo || echo "Profiles differ"
481481
482482 - name : Upload CPU Profile
483- env :
484- BRANCH_NAME : ${{ env.BRANCH_NAME }}
485483 run : |
486484 git config --global user.name 'github-actions'
487485 git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
488486 git remote set-url origin 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git'
489487 BRANCH_NAME=${GITHUB_REF#refs/heads/}
490- git checkout -b ${{ BRANCH_NAME }} -update-profile
488+ git checkout -b $BRANCH_NAME-update-profile
491489 git add default.pgo
492490 git commit -m "Update pgo profile -- CI Autogenerated" -- ${{ steps.artifact-upload-step.outputs.artifact-id }} || echo "No changes to commit"
493491 git log -1
494- git push -u origin "${ BRANCH_NAME} -update-profile"
492+ git push -u origin "$BRANCH_NAME-update-profile"
495493
496494 - name : Create Pull Request
497495 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
498- env :
499- BRANCH_NAME : ${{ env.BRANCH_NAME }}
500496 with :
501497 script : |
502498 const { repo, owner } = context.repo;
@@ -505,8 +501,8 @@ jobs:
505501 title: 'Update pgo profile',
506502 owner,
507503 repo,
508- head: '${{ env. BRANCH_NAME }} -update-profile',
509- base: '${{ env. BRANCH_NAME }} ',
504+ head: '$BRANCH_NAME-update-profile',
505+ base: '$BRANCH_NAME',
510506 state: 'open'
511507 });
512508 if (pullRequests.length > 0) {
@@ -516,14 +512,14 @@ jobs:
516512
517513 print('Creating a new pull request to update the pgo profile...');
518514 print('If the PR creation fails, please ensure that the workflow has write permissions and try again.');
519- print('Base: main, Head: ${{ env. BRANCH_NAME }} -update-profile');
515+ print('Base: main, Head: $BRANCH_NAME-update-profile');
520516
521517 const result = await github.rest.pulls.create({
522518 title: 'Update pgo profile',
523519 owner,
524520 repo,
525- head: '${{ env.BRANCH_NAME }} -update-profile',
526- base: '${{ env.BRANCH_NAME }} ',
521+ head: '$env.BRANCH_NAME-update-profile',
522+ base: '$env.BRANCH_NAME',
527523 body: [
528524 'This PR is auto-generated by the release workflow.'
529525 ].join('\n')
0 commit comments