Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI Documentation and Diagrams #3

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/workflow-generate-ci-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Generate CI Documentation
on:
workflow_call:
inputs:
commit_resources:
description: 'Commit the resources after generating them. (Requires the access_token to be passed)'
required: false
default: false
type: boolean
secrets:
access_token:
description: 'The access token to use for commits.'
required: false
workflow_dispatch:
branches:
- main
- develop
- "feature-*"
- "release-*"
inputs:
commit_resources:
description: 'commit the resources after generating them. Requires a PAT defined as secrets.COMMIT_TOKEN'
required: true
default: false
type: boolean
jobs:
update_ci_documentation:
runs-on: ubuntu-20.04
steps:
- name: Generate CI Documentation
uses: Compton-NIST/Inspector@v1
with:
artifact_name: docs_ci
output_path: docs_ci
file_prefix: OSCAL
- name: Make the workflow markdown file a README.md for the directory.
run: |
cp docs_ci/OSCAL.workflows.md docs_ci/README.md
rm -f docs_ci/OSCAL.workflows.md
- name: Commit Documentation Result (Documents and Diagrams)
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true
uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a
with:
create_branch: true
branch: auto-ci-docs-update
file_pattern: '*.svg *.md'
disable_globbing: true
skip_dirty_check: false
commit_user_name: OSCAL GitHub Actions Bot
commit_user_email: [email protected]
commit_author: OSCAL GitHub Actions Bot <[email protected]>
commit_message: Auto publishing updated CI documentation and diagrams.
create_pr:
needs: update_ci_documentation
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true
runs-on: ubuntu-20.04
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Create Pull Request with Updates
run: |
gh pr create -B main -H auto-ci-docs-update --title 'Update CI Documentation and Diagrams' --body 'Automated update from workflow-generate-ci-documentation workflow.'
env:
GITHUB_TOKEN: ${{ secrets.COMMIT_TOKEN }}
2,542 changes: 2,542 additions & 0 deletions docs_ci/OSCALOverview.graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions docs_ci/OSCALissue-triage.graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading