Skip to content

fix: undefined if deployed from branch and no config exist on main #3327

fix: undefined if deployed from branch and no config exist on main

fix: undefined if deployed from branch and no config exist on main #3327

Workflow file for this run

name: πŸ—οΈ Build
on:
push:
branches:
- '**'
jobs:
test:
name: 🀞 Test
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: 3.11.1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: 🀞 Test Dashboard Frontend
run: make test-dashboard-frontend
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: 🀞 Test
run: |
git config --global user.email "git@gimlet.io"
git config --global user.name "Github Actions"
make test
- name: 🐘 Test with Postgres store
run: |
git config --global user.email "git@gimlet.io"
git config --global user.name "Github Actions"
make test-with-postgres
cli:
name: πŸ—οΈ Build CLI
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- name: Set Node version
uses: actions/setup-node@v3
with:
node-version: 16.1.0
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: πŸ—οΈ Build chart configure frontend
run: make build-cli-frontend
- name: πŸ—οΈ Build stack frontend
run: make build-stack-frontend
- name: πŸ—οΈ Build CLI
run: make build-cli
env:
VERSION: "ci-build"
agent:
name: πŸ—οΈ Build Agent
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: πŸ—οΈ Build Gimlet Agent
run: make build-agent
env:
VERSION: "ci-build"
dashboard:
name: πŸ—οΈ Build Dashboard
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: πŸ—οΈ Build Dashboard
run: make build-dashboard
env:
VERSION: "ci-build"
dashboard-frontend:
name: πŸ—οΈ Build Dashboard Frontend
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v1
with:
fetch-depth: 5
- name: πŸ—οΈ Build dashboard frontend
run: make build-dashboard-frontend
image-builder:
name: πŸ—οΈ Build Image builder
runs-on: ubuntu-latest
needs: test
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.1
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@v1
with:
fetch-depth: 5
- name: πŸ—οΈ Build Image builder
run: make build-image-builder
env:
VERSION: "ci-build"