Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Fix inability to pass args with brackets around entrypoint #3

Merged
merged 5 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ COPY . /
WORKDIR /
RUN ["npm", "install", "--production"]

ENTRYPOINT "/entrypoint.js"
ENTRYPOINT ["/entrypoint.js"]
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,23 @@ action "deploy" {
To avoid racking up failed deployments, we suggest that you place this action after any linting and test actions.

## Now CLI arguments
It's possible to pass additional arguments through to the `now` CLI by passing them after a `--` in the positional arguments to the entrypoint (or, if you're running this from an npm installation, the `primer-deploy` CLI). However, due to a known issue with the `args` field in workflow files, you have to use `runs` like so:
It's possible to pass additional arguments through to the `now` CLI via the `args` field in your workflow action. Because the `primer-deploy` CLI accepts options of its own (such as `--dry-run`), you need to prefix any `now` arguments with `--`:

```diff
action "deploy" {
uses = "primer/deploy@master"
- args = "-- --meta foo=bar"
+ runs = "/entrypoint.js -- --meta foo=bar"
secrets = [
"GITHUB_TOKEN",
"NOW_TOKEN",
]
}
+ args = "-- --meta autoDeployed=true"
```

You can also use `args` to deploy a subdirectory, e.g. `docs`:

```diff
action "deploy" {
uses = "primer/deploy@master"
+ args = "-- docs"
```


[now]: https://zeit.co/now
[github actions]: https://github.com/features/actions
[commit status]: https://developer.github.com/v3/repos/statuses/
Expand Down