-
Notifications
You must be signed in to change notification settings - Fork 0
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
b8e14ce
commit ff9ed06
Showing
11 changed files
with
197 additions
and
138 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
name: CI Docs Shim | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [milestoned, opened, synchronize] | ||
|
||
jobs: | ||
run-test: | ||
name: ${{ matrix.type }} ${{ matrix.flavor }} | ||
runs-on: "ubuntu-latest" | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
flavor: [upstream, registry1] | ||
type: [install, upgrade] | ||
steps: | ||
- name: Shim for ${{ matrix.type }} ${{ matrix.flavor }} | ||
run: | | ||
echo "Documentation-only change detected; marking ${{ matrix.type }} ${{ matrix.flavor }} as successful." |
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,28 +1,15 @@ | ||
name: Metadata | ||
|
||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
branches: [main] | ||
types: [opened, edited, synchronize] | ||
types: [milestoned, opened, edited, synchronize] | ||
|
||
jobs: | ||
title_check: | ||
runs-on: ubuntu-latest | ||
name: Validate PR Title | ||
permissions: | ||
pull-requests: read | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
# This allows other repositories to call this workflow in a reusable way | ||
workflow_call: | ||
|
||
- name: Install commitlint | ||
run: npm install --save-dev @commitlint/{config-conventional,cli} | ||
|
||
- name: Lint PR title | ||
run: echo "${{ github.event.pull_request.title }}" | npx commitlint | ||
jobs: | ||
validate: | ||
name: Validate | ||
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@b2e8b25930c953ef893e7c787fe350f0d8679ee2 # v0.4.2 |
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,35 @@ | ||
name: Scan | ||
|
||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
branches: [main] | ||
types: [milestoned, opened, synchronize] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Lint | ||
permissions: | ||
contents: read # Allows reading the repo contents | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Environment setup | ||
uses: defenseunicorns/uds-common/.github/actions/setup@b2e8b25930c953ef893e7c787fe350f0d8679ee2 # v0.4.2 | ||
with: | ||
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} | ||
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} | ||
ghToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install lint deps | ||
run: | | ||
uds run lint:deps | ||
- name: Lint the repository | ||
run: | | ||
uds run lint: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,50 @@ | ||
name: Scorecards supply-chain security | ||
on: | ||
# Only the default branch is supported. | ||
branch_protection_rule: | ||
schedule: | ||
- cron: '30 1 * * 6' | ||
push: | ||
branches: ["main"] | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecards analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Used to receive a badge. | ||
id-token: write | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF | ||
# format to the repository Actions tab. | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard. | ||
- name: "Upload to code-scanning" | ||
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3 | ||
with: | ||
sarif_file: results.sarif |
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
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,52 +1,65 @@ | ||
name: Test package | ||
name: Test | ||
|
||
# This workflow is triggered on pull requests to the main branch. | ||
on: | ||
# Manual trigger | ||
workflow_dispatch: | ||
|
||
# Triggered by pull-request-conditionals.yaml | ||
workflow_call: | ||
pull_request: | ||
branches: [main] | ||
types: [milestoned, opened, synchronize] | ||
paths-ignore: | ||
- "**.md" | ||
- "**.jpg" | ||
- "**.png" | ||
- "**.gif" | ||
- "**.svg" | ||
- "adr/**" | ||
- "docs/**" | ||
- ".gitignore" | ||
- "renovate.json" | ||
- ".release-please-config.json" | ||
- "release-please-config.json" | ||
- "oscal-component.yaml" | ||
- "CODEOWNERS" | ||
- "LICENSE" | ||
- "CONTRIBUTING.md" | ||
- "SECURITY.md" | ||
|
||
# Abort prior jobs in the same workflow / PR | ||
concurrency: | ||
group: test-${{ github.ref }}-${{ inputs.package }} | ||
group: test-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: "ubuntu-latest" | ||
timeout-minutes: 20 | ||
name: Test | ||
run-test: | ||
name: ${{ matrix.type }} ${{ matrix.flavor }} | ||
runs-on: uds-ubuntu-big-boy-8-core | ||
timeout-minutes: 25 | ||
strategy: | ||
matrix: | ||
flavor: [registry1] | ||
type: [install, upgrade] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
|
||
- name: Environment setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Iron Bank Login | ||
run: zarf tools registry login -u "${{secrets.IRON_BANK_ROBOT_USERNAME}}" -p "${{secrets.IRON_BANK_ROBOT_PASSWORD}}" registry1.dso.mil | ||
|
||
- name: Create test bundle | ||
run: uds run create-test-bundle --set FLAVOR=${{ matrix.flavor }} | ||
|
||
- name: Setup cluster | ||
run: uds run setup-cluster | ||
uses: defenseunicorns/uds-common/.github/actions/setup@b2e8b25930c953ef893e7c787fe350f0d8679ee2 # v0.4.2 | ||
with: | ||
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} | ||
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} | ||
ghToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Deploy test bundle | ||
run: uds run deploy-test-bundle | ||
|
||
- name: Test package | ||
run: uds run test-package | ||
|
||
- name: Cleanup | ||
if: always() | ||
run: uds run cleanup | ||
- name: Test | ||
uses: defenseunicorns/uds-common/.github/actions/test@b2e8b25930c953ef893e7c787fe350f0d8679ee2 # v0.4.2 | ||
with: | ||
flavor: ${{ matrix.flavor }} | ||
type: ${{ matrix.type }} | ||
|
||
- name: Save logs | ||
if: always() | ||
uses: ./.github/actions/save-logs | ||
uses: defenseunicorns/uds-common/.github/actions/save-logs@b2e8b25930c953ef893e7c787fe350f0d8679ee2 # v0.4.2 | ||
with: | ||
suffix: ${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }} |
Oops, something went wrong.