Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0180811

Browse files
committed
Use environment variable to store release tag
1 parent 6b9b66d commit 0180811

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
@@ -15,6 +15,8 @@ jobs:
1515
permissions:
1616
contents: write # needed to push the updated files
1717
pull-requests: write # needed to create the PR
18+
env:
19+
RELEASE_TAG: ${{ inputs.tag }}
1820
steps:
1921
- name: Install Node
2022
uses: actions/setup-node@v4
@@ -34,20 +36,20 @@ jobs:
3436
shell: bash
3537
run: |
3638
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache
37-
sed -i '' 's|https://github.com/github/codeql-action/releases/download/codeql-bundle-[0-9.]*/|https://github.com/github/codeql-action/releases/download/${{ inputs.tag }}/|g' ./src/start-proxy-action.ts
39+
sed -i '' "s|https://github.com/github/codeql-action/releases/download/codeql-bundle-[0-9.]*/|https://github.com/github/codeql-action/releases/download/$RELEASE_TAG/|g" ./src/start-proxy-action.ts
3840
sed -i '' "s/\"v2.0.[0-9]*\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
3941
4042
- name: Push changes and open PR
4143
shell: bash
4244
env:
43-
BRANCH: "dependency-proxy/${{ inputs.tag }}"
45+
BRANCH: "dependency-proxy/$RELEASE_TAG"
4446
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4547
run: |
4648
set -exu
47-
pr_title="Update release used by `start-proxy` to ${{ inputs.tag }}"
49+
pr_title="Update release used by `start-proxy` to $RELEASE_TAG"
4850
pr_body=$(cat << EOF
4951
This PR updates the `start-proxy` action to use the private registry proxy binaries that
50-
are attached as release assets to the `${{ inputs.tag }}` release.
52+
are attached as release assets to the `$RELEASE_TAG` release.
5153
5254
5355
Please do the following before merging:

0 commit comments

Comments
 (0)