-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
493 additions
and
213 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
schedule: | ||
- cron: '37 23 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'java' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
name: Docker Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml -Dmaven.test.skip | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ secrets.DOCKER_HUB_USERNAME }}/api-plane | ||
flavor: latest=true | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build and Push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./hango-api-plane-server/Dockerfile | ||
# 所需要的体系结构,可以在 Available platforms 步骤中获取所有的可用架构 | ||
platforms: linux/amd64,linux/arm64/v8 | ||
push: ${{ github.ref_type == 'tag' }} | ||
tags: ${{ steps.meta.outputs.tags }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
name: Java CI with Maven | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
- name: Run unit test | ||
run: mvn test | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
check-license-lines: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Check License Lines | ||
uses: kt3k/license_checker@v1.0.6 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow integrates Scan with GitHub's code scanning feature | ||
# Scan is a free open-source security tool for modern DevOps teams | ||
# Visit https://slscan.io/en/latest/integrations/github-actions/ for help | ||
name: Scan | ||
|
||
# This section configures the trigger for the workflow. Feel free to customize depending on your convention | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- release-* | ||
|
||
jobs: | ||
Scan-Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache multiple paths | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ github.workspace }}/db | ||
key: ${{ runner.os }}-${{ hashFiles('requirements*.txt') }} | ||
- name: Perform Scan | ||
uses: ShiftLeftSecurity/scan-action@master | ||
env: | ||
VDB_HOME: ${{ github.workspace }}/db | ||
WORKSPACE: "" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
output: reports | ||
- name: Upload report | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: reports |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"**/*.go": [ | ||
"Copyright 2021 KubeCube Authors", | ||
|
||
"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." | ||
], | ||
"ignore": [ | ||
"vendor/", | ||
"docs/" | ||
] | ||
} |
Oops, something went wrong.