mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 17:50:07 +08:00
Construct target branch name in checks step
This commit is contained in:
10
.github/workflows/update-proxy-release.yml
vendored
10
.github/workflows/update-proxy-release.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
||||
RELEASE_TAG: ${{ inputs.tag || 'codeql-bundle-v2.22.0' }}
|
||||
steps:
|
||||
- name: Check release tag format
|
||||
id: checks
|
||||
shell: bash
|
||||
run: |
|
||||
if ! [[ $RELEASE_TAG =~ ^codeql-bundle-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
@@ -29,6 +30,8 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "target_branch=dependency-proxy/$RELEASE_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check that the release exists
|
||||
shell: bash
|
||||
env:
|
||||
@@ -61,7 +64,6 @@ jobs:
|
||||
- name: Push changes and open PR
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: "dependency-proxy/${{ env.RELEASE_TAG }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
run: |
|
||||
set -exu
|
||||
@@ -77,16 +79,16 @@ jobs:
|
||||
EOF
|
||||
)
|
||||
|
||||
git checkout -b "$BRANCH"
|
||||
git checkout -b "${{ steps.checks.outputs.target_branch }}"
|
||||
|
||||
npm run build
|
||||
git add ./src/start-proxy-action.ts
|
||||
git add ./lib
|
||||
git commit -m "$pr_title"
|
||||
|
||||
git push origin "$BRANCH"
|
||||
git push origin "${{ steps.checks.outputs.target_branch }}"
|
||||
gh pr create \
|
||||
--head "$BRANCH" \
|
||||
--head "${{ steps.checks.outputs.target_branch }}" \
|
||||
--base "main" \
|
||||
--title "${pr_title}" \
|
||||
--body "${pr_body}" \
|
||||
|
||||
Reference in New Issue
Block a user