generated from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Showing
156 changed files
with
50,193 additions
and
1 deletion.
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,18 @@ | ||
name: Check OPA Hash | ||
on: [workflow_dispatch] | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: repo | ||
ref: main | ||
- name: Get OPA Hash | ||
run: | | ||
cd ./repo/utils | ||
chmod +x checkOPAHash.sh | ||
./checkOPAHash.sh |
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,24 @@ | ||
name: Pylint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: ["3.9.2"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pylint | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint -d R0913,R0914,R0915,R1702,W0718,W0719,R0801 $(git ls-files '*.py') |
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,34 @@ | ||
name: Run OPA Tests | ||
on: | ||
# Run tests on each commit, newly opened/reopened PR, and | ||
# PR review submission (e.g. approval) | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "**.rego" | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: | ||
- "main" | ||
paths: | ||
- "**.rego" | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
jobs: | ||
Run-OPA-Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup OPA | ||
uses: open-policy-agent/setup-opa@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Run OPA Check | ||
run: opa check rego Testing/RegoTests --strict | ||
|
||
- name: Run OPA Tests | ||
run: opa test rego/*.rego Testing/RegoTests/**/*.rego -v |
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,46 @@ | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseName: | ||
description: "Release Name (e.g., 1.2.4)" | ||
required: true | ||
type: string | ||
version: | ||
description: "Release Version (e.g., 1.2.4)" | ||
required: true | ||
type: string | ||
|
||
name: Build Release | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
env: | ||
RELEASE_VERSION: ${{ inputs.version }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: repo | ||
ref: main | ||
- name: Package Repo for release | ||
shell: pwsh | ||
run: | | ||
$PackageName = "scubagoggles" | ||
Remove-Item -Recurse -Force repo -Include .git* | ||
Move-Item -Path repo -Destination "${PackageName}-${env:RELEASE_VERSION}" -Force | ||
Compress-Archive -Path "${PackageName}-${env:RELEASE_VERSION}" -DestinationPath "${PackageName}-${env:RELEASE_VERSION}.zip" | ||
Get-ChildItem -Path . | Write-Output | ||
- name: release | ||
uses: softprops/action-gh-release@v1 | ||
id: create_release | ||
with: | ||
draft: true | ||
prerelease: false | ||
name: v${{ inputs.releaseName }} | ||
tag_name: v${{ inputs.version }} | ||
files: scubagoggles-${{ inputs.version }}.zip | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true |
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,18 @@ | ||
.vscode | ||
.venv | ||
build | ||
scubagoggles.egg-info | ||
.DS_Store | ||
**/__pycache__ | ||
**/.DS_Store | ||
**/file.txt | ||
**/token.json | ||
**/credentials.json | ||
**/report/* | ||
**/output* | ||
**/GWSBaselineConformance* | ||
*.bak | ||
opa | ||
opa_windows_amd64.exe | ||
opa_darwin_amd64 | ||
opa_linux_amd64_static |
Oops, something went wrong.