feat(ci): add PR checks workflow with hadolint, build, and test
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
name: PR Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@df4cb1c069e1874edd3143118844c72031235010 # v6
|
||||||
|
- name: Hadolint
|
||||||
|
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: lint
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@df4cb1c069e1874edd3143118844c72031235010 # v6
|
||||||
|
- name: Build image
|
||||||
|
run: docker build -t ci-image:${{ github.sha }} .
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@df4cb1c069e1874edd3143118844c72031235010 # v6
|
||||||
|
- name: Build image
|
||||||
|
run: docker build -t ci-image:${{ github.sha }} .
|
||||||
|
- name: Run tests
|
||||||
|
run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||||
Reference in New Issue
Block a user