diff --git a/action.yml b/action.yml index cf229ef7..621b5212 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,7 @@ inputs: description: 'Space separated args to add to the "steampipe check" command.' required: false snapshot-type: - description: If set to 'public' or 'private' will create a snapshot on Turbot Pipes *requires input 'pipes-token'*, other values or not being set will not. + description: If set to 'public' or 'private' will create a snapshot on Turbot Pipes *requires input 'pipes-token'*. required: false pipes-token: description: The Turbot Pipes token used to save snapshots, required if 'snapshot-type' is set. diff --git a/examples/workflow/example-manual-annotations-workflow.yml b/examples/workflow/example-manual-annotations-workflow.yml deleted file mode 100644 index 511b9618..00000000 --- a/examples/workflow/example-manual-annotations-workflow.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Manual Workflow Example -on: - workflow_dispatch: - inputs: - mod_branch: - description: Branch of the mod to use in checks - required: true - default: main - snapshot: - description: Upload a snapshot to Turbot Pipes, if set to a value other than 'none', secrets.PIPES_TOKEN must be configured on the repository. - required: false - default: 'public' - type: choice - options: - - public - - private - annotations: - description: Apply annotations - required: false - default: false - type: boolean - -jobs: - aws_tf_compliance: - permissions: - pull-requests: write - checks: write - runs-on: ubuntu-latest - steps: - - name: Repository Checkout - uses: actions/checkout@v3 - - name: Steampipe Setup - uses: turbot/steampipe-action-setup@v1.4.0 - with: - plugin-connections: | - connection "tf" { - plugin = "terraform" - paths = [ "./examples/terraform/aws/**/*.tf" ] - } - - name: Steampipe Checks - uses: ./ - with: - mod-url: https://github.com/turbot/steampipe-mod-terraform-aws-compliance - mod-branch: ${{ inputs.mod_branch }} - snapshot-type: ${{ inputs.snapshot }} - pipes-token: ${{ secrets.PIPES_TOKEN }} - create-annotations: ${{ inputs.annotations }} \ No newline at end of file diff --git a/examples/workflow/example-manual-workflow.yml b/examples/workflow/manual_workflow_with_snapshot.yml similarity index 95% rename from examples/workflow/example-manual-workflow.yml rename to examples/workflow/manual_workflow_with_snapshot.yml index 6e3939cc..c414d444 100644 --- a/examples/workflow/example-manual-workflow.yml +++ b/examples/workflow/manual_workflow_with_snapshot.yml @@ -30,7 +30,7 @@ jobs: paths = [ "./examples/terraform/aws/**/*.tf" ] } - name: Steampipe Checks - uses: ./ + uses: turbot/steampipe-action-setup@v0.0.1 with: mod-url: https://github.com/turbot/steampipe-mod-terraform-aws-compliance mod-branch: ${{ inputs.mod_branch }} diff --git a/examples/workflow/pull_request_with_annotations.yml b/examples/workflow/pull_request_with_annotations.yml new file mode 100644 index 00000000..d670b7ff --- /dev/null +++ b/examples/workflow/pull_request_with_annotations.yml @@ -0,0 +1,28 @@ +name: Pull Request Annotation Example +on: + pull_request: + types: + - opened + branches: + - 'main' + +jobs: + compliance_with_annotations: + runs-on: ubuntu-latest + steps: + - name: Repository Checkout + uses: actions/checkout@v3 + - name: Steampipe Setup + uses: turbot/steampipe-action-setup@v1.4.0 + with: + plugin-connections: | + connection "tf" { + plugin = "terraform" + paths = [ "./examples/terraform/aws/**/*.tf" ] + } + - name: Steampipe Checks + uses: turbot/steampipe-action-setup@v0.0.1 + with: + mod-url: https://github.com/turbot/steampipe-mod-terraform-aws-compliance + create-annotations: true + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/examples/workflow/terraform_compliance_steps.yml b/examples/workflow/terraform_compliance_steps.yml index 5c3368d3..d326362b 100644 --- a/examples/workflow/terraform_compliance_steps.yml +++ b/examples/workflow/terraform_compliance_steps.yml @@ -37,7 +37,7 @@ jobs: benchmark.ecs - name: Run Steampipe Terraform GCP Compliance - uses: turbot/steampipe-action-check + uses: turbot/steampipe-action-check@v0.0.1 with: mod-url: 'https://github.com/turbot/steampipe-mod-terraform-gcp-compliance' checks: benchmark.compute diff --git a/examples/workflow/terraform_compliance_strategy.yml b/examples/workflow/terraform_compliance_strategy.yml index 77d0aaf0..4a6be7ab 100644 --- a/examples/workflow/terraform_compliance_strategy.yml +++ b/examples/workflow/terraform_compliance_strategy.yml @@ -43,7 +43,7 @@ jobs: } - name: Run Steampipe Terraform Compliance - ${{ matrix.cloud }} - uses: turbot/steampipe-action-check + uses: turbot/steampipe-action-check@v0.0.1 with: mod-url: 'https://github.com/turbot/steampipe-mod-terraform-${{ matrix.cloud }}-compliance' additional-args: '--search-path-prefix=${{ matrix.search_path }}'