mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-21 17:43:23 +01:00
9e7e2ec6db
- Support `apiToken` as an authentication method - Deprecates `apiKey` and `email`, making them optional parameters and encouraging `apiToken` usage in build logs - Support `wranglerVersion` for installing a specific Wrangler version for your build - Per #7, support for `workingDirectory` to run `wrangler-action` in a specific directory in your repo - Adds a test Workers project under the `test` directory. This is used in the repo's new set of workflows (see below) - Adds a GitHub Action workflow that: - Lints `entrypoint.sh` to ensure that the shell script looks correct - Runs the action with various config options to ensure future pushes don't introduce regressions
33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
on: push
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
name: Deploy
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Lint shell script
|
|
uses: azohra/shell-linter@v0.1.0
|
|
with:
|
|
path: "entrypoint.sh"
|
|
- name: Publish app with api token
|
|
uses: signalnerve/wrangler-action@1.1.0
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
environment: "production"
|
|
workingDirectory: 'test'
|
|
- name: Publish app with legacy credentials
|
|
uses: signalnerve/wrangler-action@1.1.0
|
|
with:
|
|
apiKey: ${{ secrets.CLOUDFLARE_API_KEY }}
|
|
email: ${{ secrets.CLOUDFLARE_EMAIL }}
|
|
environment: "production"
|
|
workingDirectory: 'test'
|
|
- name: Publish app with hardcoded Wrangler version
|
|
uses: signalnerve/wrangler-action@1.1.0
|
|
with:
|
|
apiKey: ${{ secrets.CLOUDFLARE_API_KEY }}
|
|
email: ${{ secrets.CLOUDFLARE_EMAIL }}
|
|
environment: "production"
|
|
wranglerVersion: '1.5.0'
|
|
workingDirectory: 'test'
|