Update porter_app_build-nov8_2.yml #5
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
"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 }} |