Skip to content

Commit bbfc5be

Browse files
committed
Replace inline expressions with environment variables
1 parent 6e22e41 commit bbfc5be

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
env:
3838
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3939
run: |
40-
(gh release view --repo ${{ github.event.repository.full_name }} --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
40+
(gh release view --repo "$GITHUB_REPOSITORY" --json "assets" "$RELEASE_TAG" && echo "Release found.") || exit 1
4141
4242
- name: Install Node
4343
uses: actions/setup-node@v4
@@ -63,9 +63,11 @@ jobs:
6363
6464
- name: Compile TypeScript and commit changes
6565
shell: bash
66+
env:
67+
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
6668
run: |
6769
set -exu
68-
git checkout -b "${{ steps.checks.outputs.target_branch }}"
70+
git checkout -b "$TARGET_BRANCH"
6971
7072
npm run build
7173
git add ./src/start-proxy-action.ts
@@ -76,6 +78,8 @@ jobs:
7678
shell: bash
7779
env:
7880
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
81+
TARGET_BRANCH: ${{ steps.checks.outputs.target_branch }}
82+
PR_FLAG: ${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
7983
run: |
8084
set -exu
8185
pr_title="Update release used by \`start-proxy\` to \`$RELEASE_TAG\`"
@@ -91,10 +95,10 @@ jobs:
9195
EOF
9296
)
9397
94-
git push origin "${{ steps.checks.outputs.target_branch }}"
98+
git push origin "$TARGET_BRANCH"
9599
gh pr create \
96-
--head "${{ steps.checks.outputs.target_branch }}" \
100+
--head "$TARGET_BRANCH" \
97101
--base "main" \
98102
--title "${pr_title}" \
99103
--body "${pr_body}" \
100-
${{ (github.event_name == 'workflow_dispatch' && '--draft') || '--dry-run' }}
104+
$PR_FLAG

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