Skip to content

Commit

Permalink
added additional actions
Browse files Browse the repository at this point in the history
  • Loading branch information
P-T-I committed Oct 13, 2023
1 parent edcd35a commit 87dae09
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/bandit-sec-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Security check - Bandit

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11' ]
name: Python ${{ matrix.python-version }} ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Security check - Bandit
uses: Joel-hanson/bandit-report-artifacts@V1
with:
python_version: ${{ matrix.python-version }}
project_path: .
ignore_failure: true

- name: Security check report artifacts
uses: actions/upload-artifact@v1
# if: failure()
with:
name: Security report
path: output/security_report.txt
30 changes: 30 additions & 0 deletions .github/workflows/black_formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: black-formatter

on:
- push
- pull_request


jobs:
linter_name:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
- name: Create Pull Request
if: steps.action_black.outputs.is_formatted == 'true' && github.ref == 'refs/heads/master'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Format Python code with psf/black push"
commit-message: "Format Python code with psf/black"
body: |
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
branch: actions/black

0 comments on commit 87dae09

Please sign in to comment.