adding truffelhog #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Django # workflow name | |
on: | |
push: | |
branches: # similar to "only" in GitLab | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 # similar to "image" in GitLab | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.6' | |
- run: | | |
pip3 install --upgrade virtualenv | |
virtualenv env | |
source env/bin/activate | |
pip install -r requirements.txt | |
python manage.py check | |
test: | |
runs-on: ubuntu-20.04 | |
needs: build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.6' | |
- run: | | |
pip3 install --upgrade virtualenv | |
virtualenv env | |
source env/bin/activate | |
pip install -r requirements.txt | |
python manage.py test taskManager | |
secret_scanning: | |
runs-on: ubuntu-20.04 | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
- run: docker run --rm -v $(pwd):/src hysnsec/trufflehog filesystem --directory=/src --json > trufflehog-output.json | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: TruffleHog | |
path: trufflehog-output.json | |
if: always() # what is this for? | |
integration: | |
runs-on: ubuntu-20.04 | |
needs: test | |
steps: | |
- run: echo "This is an integration step" | |
- run: exit 1 | |
continue-on-error: true | |
prod: | |
runs-on: ubuntu-20.04 | |
needs: integration | |
steps: | |
- run: echo "This is a deploy step." |