-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- linters: go, markdown, dockerfile - golang: dependencies, generated files - kubernetes: crd, default and samples validation - build: docker Signed-off-by: Pierre Péronnet <pierre.peronnet@ovhcloud.com>
- Loading branch information
Showing
4 changed files
with
126 additions
and
0 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,13 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build latest | ||
run: "docker build -t goharbor.io/harbor-operator:latest" | ||
# TODO Push image to the registry |
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,35 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
go-dependencies: | ||
runs-on: ubuntu-latest | ||
name: Dependencies are up to date | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: go mod tidy | ||
- run: go mod vendor | ||
- run: go mod graph | ||
- run: git status | ||
- name: Check diff | ||
run: test -z "$(git diff-index --diff-filter=d --name-only HEAD -- 'vendor' | grep -v 'vendor/modules.txt')" | ||
|
||
generated-files: | ||
runs-on: ubuntu-latest | ||
name: Generated files are up to date | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: make generate | ||
- name: Check diff | ||
run: test -z "$(git diff-index --diff-filter=d --name-only HEAD -- 'vendor' | grep -v 'vendor/modules.txt')" | ||
|
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,39 @@ | ||
on: push | ||
|
||
jobs: | ||
crd: | ||
runs-on: ubuntu-latest | ||
name: ./config/crd validation | ||
steps: | ||
- run: sudo apt-get install -y bzr # Required to install controller-gen in make manifests | ||
- uses: actions/checkout@v2 | ||
- run: make manifests | ||
- uses: azure/k8s-bake@v1 | ||
with: | ||
renderEngine: 'kustomize' | ||
kustomizationPath: './config/crd' | ||
kubectl-version: 'latest' | ||
|
||
operator: | ||
runs-on: ubuntu-latest | ||
name: ./config/default validation | ||
steps: | ||
- run: sudo apt-get install -y bzr # Required to install controller-gen in make manifests | ||
- uses: actions/checkout@v2 | ||
- run: make manifests | ||
- uses: azure/k8s-bake@v1 | ||
with: | ||
renderEngine: 'kustomize' | ||
kustomizationPath: './config/default' | ||
kubectl-version: 'latest' | ||
|
||
samples: | ||
runs-on: ubuntu-latest | ||
name: ./config/samples validation | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: azure/k8s-bake@v1 | ||
with: | ||
renderEngine: 'kustomize' | ||
kustomizationPath: './config/samples' | ||
kubectl-version: 'latest' |
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,39 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
go-lint: | ||
runs-on: ubuntu-latest | ||
name: GoLint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run golangci-lint | ||
uses: actions-contrib/golangci-lint@v1 | ||
with: | ||
golangci_lint_version: 1.22.2 | ||
|
||
md-lint: | ||
runs-on: ubuntu-latest | ||
name: MdLint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: markdownlint-cli | ||
uses: nosborn/github-action-markdown-cli@v1.1.1 | ||
with: | ||
files: . | ||
config_file: ".markdownlint.json" | ||
ignore_files: "vendor" | ||
|
||
docker-lint: | ||
runs-on: ubuntu-latest | ||
name: DockerLint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: lint | ||
uses: luke142367/Docker-Lint-Action@v1.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TARGET: Dockerfile |