simply github workflow since we migrate most of CI steps to prow (#4299)
This commit is contained in:
10
.github/workflows/build-multiarch.yaml
vendored
10
.github/workflows/build-multiarch.yaml
vendored
@@ -1,18 +1,19 @@
|
|||||||
name: BuildMultiArch
|
name: BuildContainerImage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'release*'
|
- 'release-*'
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'release*'
|
- 'release-*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
if: github.event_name == 'push'
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -36,7 +37,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||||
REPO=kubespheredev TAG="${GITHUB_REF#refs/*/}-multiarch" make container-cross-push
|
REPO=kubespheredev TAG="${GITHUB_REF#refs/*/}" make container-cross-push
|
||||||
|
|||||||
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
@@ -1,64 +0,0 @@
|
|||||||
name: Go
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'release*'
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'release*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
GO111MODULE: on
|
|
||||||
steps:
|
|
||||||
- name: Set up Go 1.16
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.16
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Check pr is properly formatted
|
|
||||||
run: diff -u <(echo -n) <(gofmt -d ./pkg ./cmd ./tools ./test)
|
|
||||||
|
|
||||||
- name: Verify goimports
|
|
||||||
run: go get -u golang.org/x/tools/cmd/goimports && bash hack/verify-goimports.sh
|
|
||||||
|
|
||||||
- name: Downloading go dependencies
|
|
||||||
run: go mod vendor
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: make all
|
|
||||||
|
|
||||||
- name: Make OpenAPI Spec
|
|
||||||
run: make openapi
|
|
||||||
|
|
||||||
- name: Uploading code coverage
|
|
||||||
uses: codecov/codecov-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
file: ./coverage.txt
|
|
||||||
flags: unittests
|
|
||||||
name: codecov-umbrella
|
|
||||||
fail_ci_if_error: false
|
|
||||||
|
|
||||||
- name: Build and push docker images
|
|
||||||
env:
|
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
|
||||||
REPO=kubespheredev TAG=${GITHUB_REF#refs/*/} make container-push
|
|
||||||
18
.github/workflows/nightly-builds.yml
vendored
18
.github/workflows/nightly-builds.yml
vendored
@@ -26,28 +26,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Downloading go dependencies
|
|
||||||
run: go mod vendor
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: make all
|
|
||||||
|
|
||||||
- name: Make OpenAPI Spec
|
|
||||||
run: make openapi
|
|
||||||
|
|
||||||
- name: Build and push docker images
|
- name: Build and push docker images
|
||||||
env:
|
env:
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||||
|
tag=nightly-$(date '+%Y%m%d')
|
||||||
if [[ $? == 0 ]]; then
|
REPO=kubespheredev TAG=${tag} make container-push
|
||||||
tag=nightly-$(date '+%Y%m%d')
|
|
||||||
REPO=kubespheredev TAG=${tag} make container-push
|
|
||||||
else
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: slack
|
- name: slack
|
||||||
uses: 8398a7/action-slack@v3
|
uses: 8398a7/action-slack@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user