Replace inline expressions with environment variables
This commit is contained in:
parent
6e22e41a25
commit
bbfc5bef5b
1 changed files with 9 additions and 5 deletions
14
.github/workflows/update-proxy-release.yml
vendored
14
.github/workflows/update-proxy-release.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
run: |
|
run: |
|
||||||
(gh release view --repo ${{ github.event.repository.full_name }} --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
|
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
@ -63,9 +63,11 @@ jobs:
|
||||||
|
|
||||||
- name: Compile TypeScript and commit changes
|
- name: Compile TypeScript and commit changes
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
|
||||||
run: |
|
run: |
|
||||||
set -exu
|
set -exu
|
||||||
git checkout -b "${{ steps.checks.outputs.target_branch }}"
|
git checkout -b "$TARGET_BRANCH"
|
||||||
|
|
||||||
npm run build
|
npm run build
|
||||||
git add ./src/start-proxy-action.ts
|
git add ./src/start-proxy-action.ts
|
||||||
|
|
@ -76,6 +78,8 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
|
||||||
|
PR_FLAG: ${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
|
||||||
run: |
|
run: |
|
||||||
set -exu
|
set -exu
|
||||||
pr_title="Update release used by \`start-proxy\` to \`$RELEASE_TAG\`"
|
pr_title="Update release used by \`start-proxy\` to \`$RELEASE_TAG\`"
|
||||||
|
|
@ -91,10 +95,10 @@ jobs:
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
git push origin "${{ steps.checks.outputs.target_branch }}"
|
git push origin "$TARGET_BRANCH"
|
||||||
gh pr create \
|
gh pr create \
|
||||||
--head "${{ steps.checks.outputs.target_branch }}" \
|
--head "$TARGET_BRANCH" \
|
||||||
--base "main" \
|
--base "main" \
|
||||||
--title "${pr_title}" \
|
--title "${pr_title}" \
|
||||||
--body "${pr_body}" \
|
--body "${pr_body}" \
|
||||||
${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
|
$PR_FLAG
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue