From d9a1c4b6ed023c7ded7896185b71ef5c24bf1e55 Mon Sep 17 00:00:00 2001 From: Leonardo Taccari Date: Mon, 13 Mar 2023 23:52:15 +0100 Subject: [PATCH] Add conftest GitHub Actions workflow Validate GitHub Actions workflows via personal conftest rules. --- .github/workflows/conftest.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/conftest.yml diff --git a/.github/workflows/conftest.yml b/.github/workflows/conftest.yml new file mode 100644 index 0000000..6e4cd83 --- /dev/null +++ b/.github/workflows/conftest.yml @@ -0,0 +1,21 @@ +name: Validate via personal conftest policies + +'on': + push: + branches: + - main + pull_request: + +jobs: + conftest: + name: Validate via personal conftest policies + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Validate via personal conftest policies + uses: docker://openpolicyagent/conftest:latest + env: + CONFTEST_POLICIES: git::https://github.com/iamleot/conftest-policies.git//policy/github + with: + args: test --all-namespaces --update "${{ env.CONFTEST_POLICIES }}" .github/workflows