-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NVSHAS-9630] Add release.yaml for scan-action slsa and update MakeFile
[NVSHAS-9630] Fall back to origin build.yaml with remove redundant gha [NVSHAS-9630] Update the way to setup Bats [NVSHAS-9630] Add Hadolint to check dockerfile [NVSHAS-9630] Add Hadolint to check dockerfile [NVSHAS-9630] Update bat version [NVSHAS-9630] Check out tag [NVSHAS-9630] Add checksum check [NVSHAS-9630] Improve bat setup
- Loading branch information
1 parent
ec7b6a1
commit 624d218
Showing
2 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,47 @@ | ||
name: "build" | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup BATS | ||
uses: mig4/setup-bats@v1 | ||
- name: Checkout BATS | ||
uses: actions/checkout@v4 | ||
with: | ||
bats-version: 1.7.0 | ||
repository: bats-core/bats-core | ||
ref: v1.11.0 | ||
|
||
- name: Setup BATS | ||
run: | | ||
sudo ./install.sh /usr/local | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Lint Dockerfile | ||
uses: hadolint/hadolint-action@v3.1.0 | ||
- name: Run tests | ||
run: bats test | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- run: npm ci | ||
|
||
- name: Install Hadolint | ||
run: | | ||
wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 | ||
echo "56de6d5e5ec427e17b74fa48d51271c7fc0d61244bf5c90e828aab8362d55010 hadolint" | sha256sum --check | ||
sudo mv hadolint /usr/local/bin/hadolint | ||
sudo chmod +x /usr/local/bin/hadolint | ||
- name: Run Hadolint | ||
run: | | ||
hadolint Dockerfile | ||
- name: Check if README is up-to-date | ||
run: | | ||
npm run docs | ||
git status | ||
git diff --quiet || echo 'README is not up-to-date, run `npm install && npm run docs` to update.' | ||
git diff --quiet || exit 1 | ||
- name: Run tests | ||
run: bats test | ||
git diff --quiet || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
.PHONY: test lint | ||
|
||
lint: | ||
hadolint Dockerfile | ||
|
||
test: | ||
bats test | ||
|
||
|