Skip to content

Commit

Permalink
Merge pull request #1 from appvia/test-pr
Browse files Browse the repository at this point in the history
Example change to test PR preview workflow
  • Loading branch information
mrsheepuk authored Dec 15, 2023
2 parents 9650c1d + 4575a9a commit 84de9bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
export ENV_NAME="pr-${{ github.event.pull_request.number }}"
wf create appenv --app ${{ vars.APP_NAME }} --env ${ENV_NAME} --cluster ${{ vars.PR_PREVIEW_CLUSTER }} --stage nonprod --wildcard-certs || true
wf deploy component ${{ vars.APP_NAME }} ${ENV_NAME} --component ${{ vars.APP_COMPONENT_NAME }} --image ${IMAGE_TAG} --wait-for-ready 3m
echo "PREVIEW_URL=$(wf get appenv ${{ vars.APP_NAME }}-${ENV_NAME} -o json | jq -r '.status.deployment.components[0].endpoint')" >> $GITHUB_OUTPUT
echo "PREVIEW_URL=https://$(wf get appenv ${{ vars.APP_NAME }}-${ENV_NAME} -o json | jq -r '.status.deployment.components[0].endpoint')" >> $GITHUB_OUTPUT
- name: Comment the PR
uses: actions/github-script@v6
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ wf create workspaceaccesstoken wf-example-app-ghactions --reset-token --show-tok
```

Permission the token:
* Add cluster.deployment on an existing cluster to host the PR environments (e.g. demo-envs)
* Add cluster.deployment on an existing cluster to host the PR environments (e.g. demo-envs) - note the name of the cluster
* Add workspace.appdeployer and workspace.appmanager roles

Configure other variables, adjust the values as appropriate for your app, environment, and PR preview cluster:
```
Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
</head>
<body>
<p>Hello, world!</p>
<ul>
<li>We can add things here</li>
<li>And over time, this application will get more exciting.</li>
</ul>
</body>
</html>

0 comments on commit 84de9bc

Please sign in to comment.