added license check to CI
This commit is contained in:
parent
fccaff8885
commit
3fab7eaef8
2 changed files with 38 additions and 0 deletions
13
.github/workflows/README.md
vendored
13
.github/workflows/README.md
vendored
|
@ -13,6 +13,19 @@
|
||||||
# install kubectl
|
# install kubectl
|
||||||
sudo apt-get install kubectl
|
sudo apt-get install kubectl
|
||||||
|
|
||||||
|
# install go
|
||||||
|
curl -O https://storage.googleapis.com/golang/go1.12.9.linux-amd64.tar.gz
|
||||||
|
tar -xvf go1.12.9.linux-amd64.tar.gz
|
||||||
|
sudo chown -R root:root ./go
|
||||||
|
sudo mv go /usr/local
|
||||||
|
echo 'export GOPATH=$HOME/go' >> ~/.profile
|
||||||
|
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile
|
||||||
|
source ~/.profile
|
||||||
|
|
||||||
|
# install addlicense
|
||||||
|
go get -u github.com/google/addlicense
|
||||||
|
sudo ln -s $HOME/go/bin/addlicense /bin
|
||||||
|
|
||||||
# install kind
|
# install kind
|
||||||
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64" && \
|
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64" && \
|
||||||
chmod +x ./kind && \
|
chmod +x ./kind && \
|
||||||
|
|
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -1,3 +1,17 @@
|
||||||
|
# Copyright 2020 Google LLC
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
name: "Continuous Integration"
|
name: "Continuous Integration"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -14,6 +28,17 @@ jobs:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: License Check
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
git init
|
||||||
|
git add --all
|
||||||
|
git -c user.name="CI Bot" -c user.email="<>" commit -m "initial state"
|
||||||
|
addlicense ./
|
||||||
|
if [[ -n $(git status -s) ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- uses: actions/checkout@v2
|
||||||
- name: Setup Cluster
|
- name: Setup Cluster
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
|
Loading…
Add table
Reference in a new issue