Move from azure pipelines to github action for CI (#1646)

* Move from azure pipelines to github action for CI

* pin version

* pin directly
This commit is contained in:
Joakim Sørensen
2020-10-25 16:53:45 +01:00
committed by GitHub
parent 4ee8832db6
commit 8b7dc6d50f
29 changed files with 170 additions and 653 deletions

52
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Lint
env:
HADOLINT_VERSION: v1.17.2
SHELLCHECK_OPTS: -e SC1008 -s bash
on:
pull_request:
branches: ["master"]
push:
branches: ["master"]
jobs:
hadolint:
runs-on: ubuntu-latest
name: hadolint
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run linter
id: changed_files
run: |
shopt -s globstar
for dockerfile in **/Dockerfile; do
echo "Linting: $dockerfile"
docker run --rm -i \
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
hadolint/hadolint:${{ env.HADOLINT_VERSION }} < "$dockerfile"
done
jq:
runs-on: ubuntu-latest
name: JQ
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run linter
run: |
shopt -s globstar
cat **/*.json | jq '.'
shellcheck:
runs-on: ubuntu-latest
name: ShellCheck
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run linter
uses: ludeeus/action-shellcheck@0.5.0