Skip to content

Commit

Permalink
Merge pull request #11 from PeterDaveHello/MigrateToGitHubActions
Browse files Browse the repository at this point in the history
Migrate the CI pipeline from Travsi CI to GitHub Actions
  • Loading branch information
PeterDaveHello authored Dec 15, 2024
2 parents d70cf60 + 34fedb4 commit 7fcdf38
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 41 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
hadolint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run hadolint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile

dockerfile-lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run dockerfile_lint
run: npx dockerfile_lint

build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get latest jsonlint version
id: jsonlint-version
run: |
if ! LATEST_JSONLINT=$(curl -fsSL https://registry.npmjs.org/jsonlint | jq -r '.["dist-tags"].latest'); then
echo "Failed to fetch jsonlint version" >&2
exit 1
fi
echo "LATEST_JSONLINT=${LATEST_JSONLINT}" >> $GITHUB_ENV
- name: Build Docker image
run: docker build --build-arg JSONLINT_VERSION="$LATEST_JSONLINT" -t docker-jsonlint:${{ github.sha }} .

- name: Test Docker image
run: docker run --rm docker-jsonlint:${{ github.sha }} jsonlint --help
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

0 comments on commit 7fcdf38

Please sign in to comment.