mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'release*'
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GO111MODULE: on
|
|
steps:
|
|
|
|
- name: Set up Go 1.19
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Downloading go dependencies
|
|
run: go mod tidy
|
|
|
|
# If there are any diffs from goimports or go mod tidy, fail.
|
|
- name: Verify no changes from goimports and go mod tidy.
|
|
run: |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo 'To fix this check, run "go mod tidy"'
|
|
git status # Show the files that failed to pass the check.
|
|
exit 1
|
|
fi
|
|
|
|
# - name: Build operator manager
|
|
# run: CGO_ENABLED=0 go build -tags='containers_image_openpgp' -v -o output/manager ./main.go
|
|
|
|
- name: Build command-line tool
|
|
run: |
|
|
make kk
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
if: github.event_name == 'push'
|
|
with:
|
|
name: kk
|
|
path: output/kk
|