From 9acf706c3241228303805f05a950db5c2667eb4a Mon Sep 17 00:00:00 2001 From: Graza Date: Mon, 31 Jul 2023 17:11:52 +0100 Subject: [PATCH] refactor(wip): updated test workflow, if conditionals on run steps --- .github/workflows/test.yml | 14 +++++++------- action.yml | 8 ++++---- .../workflow/terraform_compliance_strategy.yml | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a0b93d2..241e3938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,14 @@ jobs: - name: Setup steampipe id: setup-steampipe - uses: turbot/setup-steampipe-action@setup-steampipe-js + uses: turbot/steampipe-action-setup with: connections: | - connection "awscfn" { - plugin = "awscfn" - paths = [ "./**/*.yml", "./**/*.json" ] + connection "aws_tf" { + plugin = "terraform" + paths = [ "./examples/terraform/aws/**/*.tf" ] } - - name: Steampipe awscfn scan action - Checks input multiline - uses: turbot/steampipe-iac-action@infra-scan-docker + - name: Steampipe AWS TF scan action + uses: ./ with: - mod_url: -b initial-commit https://github.com/turbot/steampipe-mod-awscfn-aws-compliance.git \ No newline at end of file + mod-url: https://github.com/turbot/steampipe-mod-terraform-aws-compliance \ No newline at end of file diff --git a/action.yml b/action.yml index 4b31157c..65aa8642 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ branding: icon: shield inputs: mod-url: - description: "Mod URL to clone. Examples: https://github.com/turbot/steampipe-mod-aws-compliance." + description: "Mod URL to clone. Examples: https://github.com/turbot/steampipe-mod-aws-compliance" required: true mod-branch: description: 'Mod branch or tag to clone. Defaults to "main". Examples: main, release/v0.7, 0.5, 1.0.' @@ -92,14 +92,14 @@ runs: exit 0 - name: Setup Node + if: inputs.create-annotations == true uses: actions/setup-node@v3 - name: Annotate and summarize + if: inputs.create-annotations == true shell: bash run: | - if [ "${{ inputs.create-annotations }}" = "true" ]; then - node ${{ github.action_path }}/dist/index.js ${{ steps.get-checks.outputs.run_list }} - fi + node ${{ github.action_path }}/dist/index.js ${{ steps.get-checks.outputs.run_list }} env: GITHUB_TOKEN: ${{ inputs.github-token }} diff --git a/examples/workflow/terraform_compliance_strategy.yml b/examples/workflow/terraform_compliance_strategy.yml index 87eb1482..673f1ddc 100644 --- a/examples/workflow/terraform_compliance_strategy.yml +++ b/examples/workflow/terraform_compliance_strategy.yml @@ -17,7 +17,6 @@ jobs: search_path: "azure_tf" - cloud: "gcp" search_path: "gcp_tf" - # folder: [aws, azure, gcp] runs-on: ubuntu-latest steps: