File tree Expand file tree Collapse file tree 2 files changed +51
-41
lines changed Expand file tree Collapse file tree 2 files changed +51
-41
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
10+
11+ jobs :
12+ hadolint-test :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Run hadolint
19+ uses : hadolint/hadolint-action@v3.1.0
20+ with :
21+ dockerfile : Dockerfile
22+
23+ dockerfile-lint-test :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Checkout code
27+ uses : actions/checkout@v4
28+
29+ - name : Run dockerfile_lint
30+ run : npx dockerfile_lint
31+
32+ build-test :
33+ runs-on : ubuntu-latest
34+ steps :
35+ - name : Checkout code
36+ uses : actions/checkout@v4
37+
38+ - name : Get latest jsonlint version
39+ id : jsonlint-version
40+ run : |
41+ if ! LATEST_JSONLINT=$(curl -fsSL https://registry.npmjs.org/jsonlint | jq -r '.["dist-tags"].latest'); then
42+ echo "Failed to fetch jsonlint version" >&2
43+ exit 1
44+ fi
45+ echo "LATEST_JSONLINT=${LATEST_JSONLINT}" >> $GITHUB_ENV
46+
47+ - name : Build Docker image
48+ run : docker build --build-arg JSONLINT_VERSION="$LATEST_JSONLINT" -t docker-jsonlint:${{ github.sha }} .
49+
50+ - name : Test Docker image
51+ run : docker run --rm docker-jsonlint:${{ github.sha }} jsonlint --help
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments