Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed May 9, 2022
1 parent f168a6e commit 00dd53d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -106,7 +106,7 @@ jobs:
SECRET2: ${{ secrets.SECRET2 }}
```

If you need to run additional shell commands before or after `wrangler publish`, you can specify them as input to `preCommands` (before publish) or `postCommands` (after publish). These can include additional `wrangler` commands (i.e. `build`, `kv:key put`) or any other commands available inside the `wrangler-action` context.
If you need to run additional shell commands before or after your command, you can specify them as input to `preCommands` (before publish) or `postCommands` (after publish). These can include additional `wrangler` commands (i.e. `build`, `kv:key put`) or any other commands available inside the `wrangler-action` context.

```yaml
jobs:
Expand All @@ -123,7 +123,7 @@ jobs:
echo "******"
```

You can use the `command` option to do specific actions such as running `wrangler build` against your project:
You can use the `command` option to do specific actions such as running `wrangler whoami` against your project:

```yaml
jobs:
Expand All @@ -132,7 +132,7 @@ jobs:
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: build
command: whoami
```

## Use cases
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:

If you need help defining the correct cron syntax, check out [crontab.guru](https://crontab.guru/), which provides a friendly user interface for validating your cron schedule.

### Deploying on a "dispatched" event
### Manually triggering a deployment

If you need to trigger a workflow at-will, you can use GitHub's `workflow_dispatch` [event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) in your workflow file. By setting your workflow to trigger on that event, you will be able to deploy your application via the GitHub UI. The UI also accepts inputs that can be used to configure the action:

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -38,5 +38,5 @@ inputs:
description: "Commands to execute after publishing the Workers project"
required: false
command:
description: "The Wrangler command you wish to run. For example: publish - this will publish your Worker"
description: "The Wrangler command you wish to run. For example: \"publish\" - this will publish your Worker"
required: false
6 changes: 3 additions & 3 deletions entrypoint.sh
Expand Up @@ -46,7 +46,7 @@ elif [[ "$INPUT_WRANGLERVERSION" == 1* ]]; then
# Else install Wrangler v2
else
npm i -g "wrangler@$INPUT_WRANGLERVERSION"
WRANGLER_VERSION=1
WRANGLER_VERSION=2
fi

# If an API token is detected as input
Expand All @@ -70,8 +70,8 @@ if [ -n "$INPUT_APIKEY" ] && [ -n "$INPUT_EMAIL" ]; then
export CF_EMAIL="$INPUT_EMAIL"
export CF_API_KEY="$INPUT_APIKEY"
else
export CLOUDFLARE_EMAIL="$INPUT_EMAIL"
export CLOUDFLARE_API_KEY="$INPUT_APIKEY"
echo "::error::Wrangler v2 does not support using the API Key. You should instead use an API token."
exit 1
fi

export API_CREDENTIALS="Email and API Key"
Expand Down

0 comments on commit 00dd53d

Please sign in to comment.