Skip to content

Commit

Permalink
feat(oscal): import all available oscal - fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtkeller committed Jun 30, 2024
1 parent 315f271 commit 765c727
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
uses: defenseunicorns/lula-action/setup@095636b7880051e11b05f10a582fdd911526161c
with:
# renovate: datasource=github-tags depName=defenseunicorns/lula versioning=semver-coerced
version: v0.4.0
version: v0.4.1

- name: Iron Bank Login
if: ${{ inputs.registry1Username != '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-oscal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '**/*oscal*.yaml'

permissions:
contents: read
contents: read

jobs:
lint:
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/pull-request-conditionals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,24 @@ jobs:
filters: .github/filters.yaml

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
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: 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 }}
- 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:
Expand Down
10 changes: 8 additions & 2 deletions compliance/oscal-component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ component-definition:
rel: website

import-component-definitions:
- href: 'file:../src/istio/oscal-component.yaml'
- href: 'file://../src/grafana/oscal-component.yaml'
- href: 'file://../src/istio/oscal-component.yaml'
- href: 'file://../src/loki/oscal-component.yaml'
- href: 'file://../src/neuvector/oscal-component.yaml'
- href: 'file://../src/prometheus-stack/oscal-component.yaml'
- href: 'file://../src/promtail/oscal-component.yaml'
- href: 'file://../src/velero/oscal-component.yaml'

capabilities:
- uuid: 857dcaf8-9080-4cf0-8029-8a03fcdde2df
Expand All @@ -28,6 +34,6 @@ component-definition:
back-matter:
resources:
- rlinks:
- href: https://github.com/defenseunicorns/uds-coore/
- href: https://github.com/defenseunicorns/uds-core/
title: UDS Core
uuid: 8fe4806d-4aef-4cf0-b9ed-d95d224e97bc

0 comments on commit 765c727

Please sign in to comment.