Skip to content

Commit e9b53eb

Browse files
committed
fix: stop GitHub from evaluating example expressions in action.yml
GitHub's runner evaluates `${{ ... }}` tokens that appear anywhere in `action.yml` — including inside `description:` blocks — when it loads the action manifest. Embedding `${{ github.sha }}` and `${{ secrets.OPENAI_API_KEY }}` literally as documentation examples caused every workflow that referenced this action to fail at load time with `Unrecognized named-value: 'github'` and `'secrets'`. Replace the four offending example tokens with placeholders that don't resemble Actions expressions: - `tags` example: `commit: ${{ github.sha }}` → `commit: <commit-sha>` - `branch` description: ``Defaults to `${{ github.ref_name }}`.`` → ``Defaults to the `GITHUB_REF_NAME` environment variable.`` - `commit-sha` description: same treatment with `GITHUB_SHA`. - `secrets` example: `KEY=${{ secrets.* }}` → `KEY=<placeholder>`. Real workflow examples in README.md and examples/ are unaffected because expressions inside workflow files are evaluated normally.
1 parent f84b3ab commit e9b53eb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ inputs:
4747
tags: |
4848
environment: production
4949
team: data-platform
50-
commit: ${{ github.sha }}
50+
commit: <commit-sha>
5151
5252
JSON form:
5353
tags: '{"environment":"production","team":"data-platform"}'
@@ -74,10 +74,10 @@ inputs:
7474
description: Number of replicas for this deployment (1-10).
7575
required: false
7676
branch:
77-
description: Git branch attributed to the deployment. Defaults to `${{ github.ref_name }}`.
77+
description: Git branch attributed to the deployment. Defaults to the `GITHUB_REF_NAME` environment variable.
7878
required: false
7979
commit-sha:
80-
description: Git commit SHA attributed to the deployment. Defaults to `${{ github.sha }}`.
80+
description: Git commit SHA attributed to the deployment. Defaults to the `GITHUB_SHA` environment variable.
8181
required: false
8282
commit-message:
8383
description: Commit message for the deployment. Defaults to the head-commit message of the GitHub event.
@@ -93,8 +93,8 @@ inputs:
9393
9494
Example:
9595
secrets: |
96-
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
97-
PG_PASSWORD=${{ secrets.PG_PASSWORD }}
96+
OPENAI_API_KEY=<openai-api-key>
97+
PG_PASSWORD=<pg-password>
9898
required: false
9999
wait-for-completion:
100100
description: Poll the deployment until it succeeds or fails.

0 commit comments

Comments
 (0)