Skip to content

Commit a64a4f0

Browse files
committed
Fix escaping in workflows
1 parent e28a578 commit a64a4f0

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/codex-update.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ jobs:
2323
- name: Check if update is required
2424
id: check
2525
run: |
26-
if ! npm outdated ${{ env.CODEX_PACKAGE }}; then
26+
if ! npm outdated "$CODEX_PACKAGE"; then
2727
echo "Package is up to date"
2828
exit 0
2929
fi
3030
31-
LATEST=$(npm view ${{ env.CODEX_PACKAGE }} version)
31+
LATEST=$(npm view "$CODEX_PACKAGE" version)
3232
BRANCH="codex-update/$LATEST"
3333
3434
if git ls-remote --exit-code --heads origin "refs/heads/$BRANCH" >/dev/null 2>&1; then
3535
echo "Branch $BRANCH already exists"
3636
exit 0
3737
fi
3838
39-
echo "version=$LATEST" >> $GITHUB_OUTPUT
40-
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
41-
echo "should_update=true" >> $GITHUB_OUTPUT
39+
echo "version=$LATEST" >> "$GITHUB_OUTPUT"
40+
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
41+
echo "should_update=true" >> "$GITHUB_OUTPUT"
4242
4343
update:
4444
needs: check
@@ -54,14 +54,14 @@ jobs:
5454
run: |
5555
git config user.name "github-actions[bot]"
5656
git config user.email "github-actions[bot]@users.noreply.github.com"
57-
git checkout -b "${{ env.BRANCH }}"
57+
git checkout -b "$BRANCH" --
5858
5959
- name: Install new version of package and commit
6060
run: |
61-
npm install ${{ env.CODEX_PACKAGE }}@${{ env.VERSION }}
61+
npm install "$CODEX_PACKAGE@$VERSION"
6262
npm run generate-types
6363
git add package.json package-lock.json src/app-server
64-
git commit -m "Update codex to ${{ env.VERSION }}"
64+
git commit -m "Update codex to $VERSION"
6565
6666
- name: Finalize update with Codex
6767
id: codex-finalize
@@ -83,7 +83,7 @@ jobs:
8383
8484
- name: Push branch updates
8585
run: |
86-
git push origin "${{ env.BRANCH }}"
86+
git push -- origin "$BRANCH"
8787
8888
- name: Generate GitHub App token
8989
id: app-token
@@ -96,10 +96,10 @@ jobs:
9696
env:
9797
GH_TOKEN: ${{ steps.app-token.outputs.token }}
9898
run: |
99-
echo -e "[What's new](https://github.com/openai/codex/releases/tag/rust-v${{ env.VERSION }})\n\n$(cat pr-body.md 2>/dev/null || true)" > pr-body.md
99+
echo -e "[What's new](https://github.com/openai/codex/releases/tag/rust-v${VERSION})\n\n$(cat pr-body.md 2>/dev/null || true)" > pr-body.md
100100
101101
gh pr create \
102102
--base main \
103-
--title "Update codex to ${{ env.VERSION }}" \
103+
--title "Update codex to $VERSION" \
104104
--body-file pr-body.md \
105105
--label "codex-update"

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ jobs:
8888
</plist>
8989
EOF
9090
ENTITLEMENTS_BASE64=$(gzip -c entitlements.plist | base64 -w 0)
91-
echo "ENTITLEMENTS_BASE64=$ENTITLEMENTS_BASE64" >> $GITHUB_ENV
91+
{
92+
echo "ENTITLEMENTS_BASE64<<EOF"
93+
echo "$ENTITLEMENTS_BASE64"
94+
echo "EOF"
95+
} >> "$GITHUB_ENV"
9296
9397
- name: Sign macOS binaries
9498
env:

0 commit comments

Comments
 (0)