diff --git a/.github/workflows/checkov.yaml b/.github/workflows/checkov.yaml deleted file mode 100644 index acee34d..0000000 --- a/.github/workflows/checkov.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: build -on: - push: - branches: - - master -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7] - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Run yor action - uses: bridgecrewio/yor-action@main - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Update documentation - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git fetch --tags - git pull - - latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) - echo "latest tag: $latest_tag" - new_tag=$(echo $latest_tag | awk -F. -v a="$1" -v b="$2" -v c="$3" '{printf("%d.%d.%d", $1+a, $2+b , $3+1)}') - echo "new tag: $new_tag" - - pip install -U checkov - cat .github/template.md > README.md && checkov -d . -o github_failed_only -s >> README.md - git add README.md || echo "No changes to commit" - git commit -m "update resource scan result doc" README.md || echo "No changes to commit" - git push origin - git tag $new_tag - git push origin $new_tag diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index 114349a..0000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: checkov-scan -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7] - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - name: Checkov Github Action - uses: bridgecrewio/checkov-action@v5 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ba4ca7f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: CPSP-workshop +on: +push: +branches: +- master +jobs: +scan: +runs-on: ubuntu-latest +strategy: +matrix: +python-version: [3.8] +steps: +- name: Checkout repo +uses: actions/checkout@v2 +- name: Run Bridgecrew +id: Bridgecrew +uses: bridgecrewio/bridgecrew-action@master +env: +PRISMA_API_URL: https://api3.prismacloud.io +with: +api-key: ${{ secrets.BC_API_KEY }} +soft_fail: true