add alias column when printing freight with kubectl #2974
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
- release-* | |
jobs: | |
test-unit: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: /go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run unit tests | |
run: make test-unit | |
- name: Upload coverage reports | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint-go: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install linter | |
env: | |
GOLANGCI_LINT_VERSION: 1.54.2 | |
working-directory: /usr/local/bin | |
run: | | |
curl -sSfL https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz \ | |
| tar xvz golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint --strip-components=1 | |
- name: Configure Git | |
run: git config --global --add safe.directory '*' | |
- name: Run linter | |
env: | |
GO_LINT_ERROR_FORMAT: github-actions | |
run: make lint-go | |
lint-charts: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install linter | |
run: | | |
cd /usr/local/bin | |
curl -sSfL https://get.helm.sh/helm-v3.10.0-linux-amd64.tar.gz \ | |
| tar xvz linux-amd64/helm --strip-components=1 | |
- name: Run linter | |
run: make lint-charts | |
lint-proto: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install linter | |
uses: bufbuild/buf-setup-action@v1 | |
with: | |
version: "1.20.0" | |
- name: Run linter | |
env: | |
BUF_LINT_ERROR_FORMAT: github-actions | |
run: make lint-proto | |
check-codegen: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: Install nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.9.0" | |
cache: "pnpm" | |
cache-dependency-path: "**/pnpm-lock.yaml" | |
- name: Install nodejs dependencies | |
run: pnpm install --dev | |
working-directory: ./ui | |
- uses: actions/cache@v3 | |
with: | |
path: /go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install buf | |
run: go install github.com/bufbuild/buf/cmd/buf@v1.26.1 | |
- name: Install controller-gen | |
run: go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0 | |
- name: Run Codegen | |
run: make codegen | |
- name: Git stuff | |
# As of go 1.20, this seems to be necessary for invoking git commands | |
# within the container | |
run: git config --global --add safe.directory /__w/kargo/kargo | |
- name: Check nothing has changed | |
run: git diff --exit-code -- . | |
build-image: | |
needs: [test-unit, lint-go, lint-charts, lint-proto, check-codegen] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-cli: | |
needs: [test-unit, lint-go, lint-charts, lint-proto, check-codegen] | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21.4-bookworm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: /go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build CLI | |
env: | |
GOFLAGS: -buildvcs=false | |
run: make build-cli |