Skip to content

Commit 9d00325

Browse files
authored
add super-linter GitHub presubmit action (#1)
* add super-linter GitHub presubmit action * disable running kubeval linter * fix MD lint problems
1 parent dfe25a0 commit 9d00325

File tree

6 files changed

+42
-10
lines changed

6 files changed

+42
-10
lines changed

.github/linters/.markdown-lint.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://github.com/DavidAnson/markdownlint#optionsconfig
2+
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
3+
4+
# Bare URL are OK
5+
MD034: false
6+
7+
MD013:
8+
line_length: 4096
9+
strict: false
10+
stern: false

.github/workflows/linter.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/github/super-linter
2+
name: Lint Code Base
3+
on:
4+
push:
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
build:
9+
name: Lint Code Base
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Lint Code Base
19+
uses: github/super-linter@v4
20+
env:
21+
DEFAULT_BRANCH: master
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
MARKDOWN_CONFIG_FILE: .markdown-lint.yaml
24+
# https://github.com/github/super-linter/issues/1601
25+
VALIDATE_KUBERNETES_KUBEVAL: false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Learning Kubernetes Codelabs
1+
# Learning Kubernetes Codelabs [![GitHub Super-Linter](https://github.com/vorburger/LearningKubernetes-CodeLabs/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
22

33
This is a Code Lab style course for learning Kubernetes, with the following lessons:
44

TODO.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# ToDo
2+
13
- [ ] Lessons:
24

35
- [ ] API: Build an Operator
@@ -39,8 +41,6 @@
3941
ssh: connect to host $IP port 22: Connection timed out
4042
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
4143

42-
- [ ] GitHub Action (pre-commit hook) to lint all markdown, check links, etc.
43-
44-
- [ ] https://github.com/googlecodelabs/tools ?
44+
- [ ] https://github.com/googlecodelabs/tools ?
4545

4646
- [ ] https://codelabs.developers.google.com ?

docs/hello-world.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
minikube dashboard
1212

13-
If you run `minikube` inside a Virtual Machine (VM) instead of on your Laptop/Desktop workstation, then you'll need to set up some port forwarding to be able to access services in your local web browser.
13+
If you run `minikube` inside a Virtual Machine (VM) instead of on your Laptop/Desktop workstation, then you'll need to set up some port forwarding to be able to access services in your local web browser.

docs/install.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ To follow the lessons in this tutorial, you need to have the following prerequis
88

99
There are several ways to set this up, see the options below. Alternatives include e.g. `kind`, `kubeadm`; or cloud hosted managed Kubernetes offerings like Google's GKE; or local distributions like k3s.io, k3s.io, OpenShift, et al. (We may add documentation about such other approaches later.)
1010

11-
1211
## minikube Docker driver
1312

1413
One of easiest ways to get started on a developer workstation is to use https://minikube.sigs.k8s.io/docs/start, and:
@@ -18,11 +17,10 @@ One of easiest ways to get started on a developer workstation is to use https://
1817

1918
This creates a VM, and works equally well on Windows, Mac and Linux.
2019

21-
2220
## minikube None driver
2321

2422
To avoid creating a VM and run the Kubernetes control panel containers straight on the host,
25-
which is suitable e.g. inside a new Linux VM which isn't used for anything else, use the
23+
which is suitable e.g. inside a new Linux VM which isn't used for anything else, use the
2624
_[Linux "none" (= bare-metal) driver](https://minikube.sigs.k8s.io/docs/drivers/none/)_,
2725
e.g. with Debian 10 simply:
2826

@@ -36,13 +34,12 @@ e.g. with Debian 10 simply:
3634
sudo chown -R $(id -un):$(id -gn $(id -un)) /home/vorburger_google_com/.minikube/
3735
alias k="minikube kubectl -- "
3836

39-
4037
## Test Installation
4138

4239
The goal of each of the set-up options above, if successful, is that you should be able to run:
4340

4441
k get pods -A
45-
42+
4643
and see:
4744

4845
NAMESPACE NAME READY STATUS RESTARTS AGE

0 commit comments

Comments
 (0)