Skip to content

Commit

Permalink
add support for variables during deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Jindal <[email protected]>
  • Loading branch information
rajatjindal committed Aug 10, 2023
1 parent d4584e8 commit 7e20bc9
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-spin-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: setup spin
uses: ./spin/setup/
with:
version: v0.10.0
version: v1.4.1
plugins: js2wasm
github_token: ${{ github.token }}

Expand All @@ -127,7 +127,7 @@ jobs:
- name: setup spin
uses: ./spin/setup/
with:
version: v0.10.0
version: v1.4.1
plugins: js2wasm,py2wasm
github_token: ${{ github.token }}

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ Build and deploy the Spin app to Fermyon Cloud.
| manifest_file | False | spin.toml | Path to `spin.toml`. |
| key_values | False | - | Pass a key/value (key=value) to all components of the application. You can specify multiple key_values by putting each key/value pair on its own line. Refer to example below. |
| run_build | False | True | If enabled, run `spin build` |
| variables | False | - | Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line. Refer to example below. |


### Outputs

Expand Down Expand Up @@ -197,6 +199,9 @@ jobs:
key_values: |-
abc=xyz
foo=bar
variables: |-
password=${{ secrets.SECURE_PASSWORD }}
apikey=${{ secrets.API_KEY }}
```
## Deploy preview of Spin app to Fermyon Cloud - `fermyon/actions/spin/preview@v1`
Expand All @@ -218,6 +223,7 @@ If you don't run the preview action with undeploy on the closed event, your prev
| github_token | True | - | The GitHub token for adding a comment on PR with preview URL. |
| undeploy | False | - | If true, removes the preview deployment from Fermyon Cloud |
| key_values | False | - | Pass one or more key/value pairs to the default store for all components" |
| variables | False | - | Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line. Refer to example below. |

### Outputs

Expand Down Expand Up @@ -258,4 +264,7 @@ jobs:
key_values: |-
abc=xyz
foo=bar
variables: |-
password=${{ secrets.SECURE_PASSWORD }}
apikey=${{ secrets.API_KEY }}
```
26 changes: 20 additions & 6 deletions dist/spin/deploy/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions dist/spin/preview/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions dist/spin/push/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions dist/spin/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions spin/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
required: false
description: 'run `spin build` if enabled (default)'
default: true
variables:
required: false
description: 'Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line'
outputs:
app_url:
description: 'the URL of the deployed app'
Expand Down
Loading

0 comments on commit 7e20bc9

Please sign in to comment.