forked from porter-dev/js-test-app
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.93 KB
/
porter_app_build-nov8_2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"on":
push:
branches:
- master
name: Deploy to build-nov8
jobs:
porter-deploy:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Checkout CLI repo
uses: actions/checkout@v4
with:
repository: porter-dev/code
ref: 'dgtown/dev-cli'
token: ${{ secrets.DEV_CLI_TOKEN }} # Need PAT if CLI repo is private
- name: Build and install CLI
working-directory: legacy-backend
run: |
# Create dev version using PR number or timestamp
DEV_VERSION="0.0.0-dev.${GITHUB_RUN_NUMBER}"
# Build with custom name to avoid conflicts
go build -o porter -ldflags "-X main.Version=${DEV_VERSION}" ./cli/main.go
# Install to PATH
sudo mv porter /usr/local/bin/
# Verify installation
porter version
- name: Checkout current repo
uses: actions/checkout@v4
with:
# Clean checkout of current repo after CLI installation
clean: true
- name: Deploy stack
timeout-minutes: 30
run: exec porter apply
env:
PORTER_APP_NAME: build-nov8
PORTER_CLUSTER: "2"
PORTER_DEPLOYMENT_TARGET_ID: 2ff801c5-43c8-4673-9afc-42aa5087e21c
PORTER_HOST: https://dgtown2.withporter.run
PORTER_PR_NUMBER: ${{ github.event.number }}
PORTER_PROJECT: "1"
PORTER_REPO_NAME: ${{ github.event.repository.name }}
PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
PORTER_TOKEN: ${{ secrets.PORTER_APP_1_2 }}