|
| 1 | +# GitHub Action for Auth0 Deploy CLI |
| 2 | +This action for [auth0-deploy-cli](https://github.com/auth0/auth0-deploy-cli) enables |
| 3 | +arbitrary actions with the `a0deploy` command, including import and export of tenant |
| 4 | +configuration. |
| 5 | + |
| 6 | +### Usage |
| 7 | +An example configuration deploying tenant configuration from the project where this |
| 8 | +workflow is running. The tenant input file is expected to be at `./tenant.yml`. |
| 9 | + |
| 10 | +```yaml |
| 11 | +name: Auth0 Deploy Tenant |
| 12 | +on: [push] |
| 13 | + |
| 14 | +jobs: |
| 15 | + import: |
| 16 | + name: Import Tenant Configuration |
| 17 | + uses: twyla-ai/action-auth0-deploy-cli@master |
| 18 | + with: |
| 19 | + domain: "<tenant>.auth0.com" |
| 20 | + id: ${{ secrets.AUTH0_CLIENT_ID }} |
| 21 | + secret: ${{ secrets.AUTH0_CLIENT_SECRET }} |
| 22 | + args: "import -i tenant.yml" |
| 23 | + env: |
| 24 | + AUTH0_ALLOW_DELETE: "true" |
| 25 | +``` |
| 26 | +
|
| 27 | +#### Example With Keyword Replace Mappings |
| 28 | +Consider a scenario where the following config file is normally used. |
| 29 | +
|
| 30 | +```json |
| 31 | +{ |
| 32 | + "AUTH0_DOMAIN": "<tenant>.auth0.com", |
| 33 | + "AUTH0_CLIENT_ID": "<auth0-client-id>", |
| 34 | + "AUTH0_CLIENT_SECRET": "<auth-client-secret>", |
| 35 | + "AUTH0_KEYWORD_REPLACE_MAPPINGS": { |
| 36 | + "CONNECTION_GOOGLE_CLIENT_ID": "<value>", |
| 37 | + "CONNECTION_GOOGLE_CLIENT_SECRET": "<value>", |
| 38 | + "CALLBACK_URL": "http://localhost:8080" |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +This can be configured via the action as follows. Note that additional config file can |
| 44 | +also be specified by appending `-c ./path/to/config.json` to args. |
| 45 | + |
| 46 | +```yaml |
| 47 | +name: Import Tenant Configuration |
| 48 | +uses: twyla-ai/action-auth0-deploy-cli@master |
| 49 | +with: |
| 50 | + domain: "<tenant>.auth0.com" |
| 51 | + id: ${{ secrets.AUTH0_CLIENT_ID }} |
| 52 | + secret: ${{ secrets.AUTH0_CLIENT_SECRET }} |
| 53 | + args: "import" |
| 54 | +env: |
| 55 | + AUTH0_INPUT_FILE: ./tenant.yaml |
| 56 | + CONNECTION_GOOGLE_CLIENT_ID: "<value>" |
| 57 | + CONNECTION_GOOGLE_CLIENT_SECRET: "<value>" |
| 58 | + CALLBACK_URL: http://localhost:8080 |
| 59 | +``` |
| 60 | +
|
| 61 | +### Environment Variables |
| 62 | +Any environment variable respected by the underlying `a0deploy` command can be passed in |
| 63 | +via `env`. |
0 commit comments