Skip to content

Commit 3f49393

Browse files
authored
Merge pull request #13 from porter-dev/porter-stack-preview
Enable Preview Environments on Porter
2 parents 4ae41bf + 36115b6 commit 3f49393

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"on":
2+
pull_request:
3+
branches:
4+
- main
5+
types:
6+
- opened
7+
- synchronize
8+
paths:
9+
- '**'
10+
- '!.github/workflows/porter_**'
11+
name: Deploy to Preview Environment
12+
jobs:
13+
porter-deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
- name: Set Github tag
19+
id: vars
20+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
21+
- name: Setup porter
22+
uses: porter-dev/[email protected]
23+
- name: Build and deploy preview environment
24+
timeout-minutes: 30
25+
run: exec porter apply -f ./porter.yaml --preview
26+
env:
27+
PORTER_CLUSTER: "11"
28+
PORTER_HOST: https://dashboard.internal-tools.porter.run
29+
PORTER_PR_NUMBER: ${{ github.event.number }}
30+
PORTER_PROJECT: "8"
31+
PORTER_REPO_NAME: ${{ github.event.repository.name }}
32+
PORTER_STACK_NAME: cowsay
33+
PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
34+
PORTER_TOKEN: ${{ secrets.PORTER_STACK_8_11 }}

0 commit comments

Comments
 (0)