Skip to content

Commit 6a3692d

Browse files
committed
Construct target branch name in checks step
1 parent 9ee60a6 commit 6a3692d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/update-proxy-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ jobs:
2222
RELEASE_TAG: ${{ inputs.tag || 'codeql-bundle-v2.22.0' }}
2323
steps:
2424
- name: Check release tag format
25+
id: checks
2526
shell: bash
2627
run: |
2728
if ! [[ $RELEASE_TAG =~ ^codeql-bundle-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2829
echo "Invalid release tag: expected a CodeQL bundle tag in the 'codeql-bundle-vM.N.P' format."
2930
exit 1
3031
fi
3132
33+
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
34+
3235
- name: Check that the release exists
3336
shell: bash
3437
env:
@@ -61,7 +64,6 @@ jobs:
6164
- name: Push changes and open PR
6265
shell: bash
6366
env:
64-
BRANCH: "dependency-proxy/${{ env.RELEASE_TAG }}"
6567
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
6668
run: |
6769
set -exu
@@ -77,16 +79,16 @@ jobs:
7779
EOF
7880
)
7981
80-
git checkout -b "$BRANCH"
82+
git checkout -b "${{ steps.checks.outputs.target_branch }}"
8183
8284
npm run build
8385
git add ./src/start-proxy-action.ts
8486
git add ./lib
8587
git commit -m "$pr_title"
8688
87-
git push origin "$BRANCH"
89+
git push origin "${{ steps.checks.outputs.target_branch }}"
8890
gh pr create \
89-
--head "$BRANCH" \
91+
--head "${{ steps.checks.outputs.target_branch }}" \
9092
--base "main" \
9193
--title "${pr_title}" \
9294
--body "${pr_body}" \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy