-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa05cd4
commit 315f271
Showing
4 changed files
with
61 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# action.yml | ||
name: "lint-oscal" | ||
description: "Lula Lint OSCAL" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: lint-oscal | ||
run: | | ||
uds run lint-oscal --set OSCALFILES=${{ inputs.OSCALFILES }} |
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 |
---|---|---|
|
@@ -25,3 +25,5 @@ tempo: | |
- "src/tempo/**" | ||
velero: | ||
- "src/velero/**" | ||
oscal: | ||
- "**/*oscal*.yaml" |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Lint OSCAL Files | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/*oscal*.yaml' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Identify changed OSCAL files | ||
id: find_changed_files | ||
run: | | ||
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD | grep 'oscal.*\.yaml$' || true) | ||
echo "Changed OSCAL files: $CHANGED_FILES" | ||
echo "::set-output name=oscal_files::$CHANGED_FILES" | ||
- name: Run lint-oscal | ||
uses: .github/actions/lint-oscal/action.yaml | ||
with: | ||
OSCALFILES: ${{ steps.find_changed_files.outputs.oscal_files }} |
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 |
---|---|---|
|
@@ -39,8 +39,6 @@ jobs: | |
run: brew install defenseunicorns/tap/[email protected] | ||
- name: Run Formatting Checks | ||
run: uds run lint-check --no-progress | ||
- name: Setup Lula | ||
uses: .github/actions/setup | ||
|
||
# This job checks if there are changes in specific paths source packages. | ||
check-paths: | ||
|
@@ -61,7 +59,27 @@ jobs: | |
with: | ||
filters: .github/filters.yaml | ||
|
||
# This job triggers a separate workflow for each changed source package, if any. | ||
run-lint-oscal: | ||
needs: check-paths | ||
if: needs.check-paths.outputs.oscal_changed == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Identify changed OSCAL files | ||
id: find_changed_files | ||
run: | | ||
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD | grep 'oscal.*\.yaml$' || true) | ||
echo "Changed OSCAL files: $CHANGED_FILES" | ||
echo "::set-output name=oscal_files::$CHANGED_FILES" | ||
- name: Run lint-oscal | ||
uses: ./.github/actions/lint-oscal/action.yaml | ||
with: | ||
OSCALFILES: ${{ steps.find_changed_files.outputs.oscal_files }} | ||
|
||
# This job triggers a separate workflow for each changed source package, if any. | ||
run-package-test: | ||
needs: check-paths | ||
name: Schedule | ||
|