-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rajat Jindal <[email protected]>
- Loading branch information
1 parent
912e691
commit 6d82f5b
Showing
13 changed files
with
33,207 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: deploy spin app preview e2e tests | ||
on: | ||
pull_request: | ||
branches: ["main"] | ||
types: ['opened', 'synchronize', 'reopened', 'closed'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository_owner == 'fermyon' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19 | ||
|
||
- name: npm install | ||
run: npm install | ||
|
||
- name: npm run build | ||
run: npm run package | ||
env: | ||
NODE_OPTIONS: --openssl-legacy-provider | ||
|
||
- name: upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: spin-actions | ||
path: dist/spin/preview/index.js | ||
|
||
deploy-preview-fermyon-cloud: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Retrieve saved Github action | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: spin-actions | ||
path: dist/spin/preview/ | ||
|
||
- name: setup spin | ||
uses: ./spin/setup/ | ||
with: | ||
version: canary | ||
plugins: js2wasm | ||
github_token: ${{ github.token }} | ||
|
||
- name: build and deploy preview | ||
uses: ./spin/preview/ | ||
with: | ||
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
manifest_file: example-app/spin.toml | ||
undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.