Skip to content

Commit

Permalink
Update porter_app_build-nov8_2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town authored Nov 8, 2024
1 parent 1e4d288 commit 30fc285
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/porter_app_build-nov8_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,41 @@ jobs:
porter-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Github tag
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Setup porter
uses: porter-dev/setup-porter@v0.1.0
- name: Deploy stack
timeout-minutes: 30
run: exec porter apply
env:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Checkout CLI repo
uses: actions/checkout@v4
with:
repository: porter-dev/code
ref: 'dgtown/dev-cli'
token: ${{ secrets.CLI_PAT }} # 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
Expand Down

0 comments on commit 30fc285

Please sign in to comment.