Use environment variable to store release tag
This commit is contained in:
parent
6b9b66d6f9
commit
0180811a94
1 changed files with 6 additions and 4 deletions
10
.github/workflows/update-proxy-release.yml
vendored
10
.github/workflows/update-proxy-release.yml
vendored
|
|
@ -15,6 +15,8 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # needed to push the updated files
|
contents: write # needed to push the updated files
|
||||||
pull-requests: write # needed to create the PR
|
pull-requests: write # needed to create the PR
|
||||||
|
env:
|
||||||
|
RELEASE_TAG: ${{ inputs.tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
@ -34,20 +36,20 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache
|
NOW=$(date +"%Y%m%d%H%M%S") # only used to make sure we don't fetch stale binaries from the toolcache
|
||||||
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
|
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
|
||||||
sed -i '' "s/\"v2.0.[0-9]*\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
|
sed -i '' "s/\"v2.0.[0-9]*\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts
|
||||||
|
|
||||||
- name: Push changes and open PR
|
- name: Push changes and open PR
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BRANCH: "dependency-proxy/${{ inputs.tag }}"
|
BRANCH: "dependency-proxy/$RELEASE_TAG"
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
run: |
|
run: |
|
||||||
set -exu
|
set -exu
|
||||||
pr_title="Update release used by `start-proxy` to ${{ inputs.tag }}"
|
pr_title="Update release used by `start-proxy` to $RELEASE_TAG"
|
||||||
pr_body=$(cat << EOF
|
pr_body=$(cat << EOF
|
||||||
This PR updates the `start-proxy` action to use the private registry proxy binaries that
|
This PR updates the `start-proxy` action to use the private registry proxy binaries that
|
||||||
are attached as release assets to the `${{ inputs.tag }}` release.
|
are attached as release assets to the `$RELEASE_TAG` release.
|
||||||
|
|
||||||
|
|
||||||
Please do the following before merging:
|
Please do the following before merging:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue