Skip to content

Commit 7fcdf38

Browse files
Merge pull request #11 from PeterDaveHello/MigrateToGitHubActions
Migrate the CI pipeline from Travsi CI to GitHub Actions
2 parents d70cf60 + 34fedb4 commit 7fcdf38

File tree

2 files changed

+51
-41
lines changed

2 files changed

+51
-41
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)