-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
64 lines (59 loc) · 1.45 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: 2.1
jobs:
trufflehog:
docker:
- image: python:3-alpine
steps:
- checkout
- run:
name: install trufflehog
command: apk add --no-cache git && pip install gitdb2==3.0.0 trufflehog
- run:
name: run trufflehog
command: trufflehog --exclude_paths trufflehog/exclude-patterns.txt --allow trufflehog/allow.json .
docker:
docker:
- image: docker
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build
command: docker build . -t darakeon/mebrak -f docker/mebrak.dockerfile
- run:
name: Push
command: |
if [ "$CIRCLE_BRANCH" == "main" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push darakeon/mebrak
else
echo 'no main, no push'
fi
static:
docker:
- image: python
- image: darakeon/mebrak
steps:
- checkout
- run:
name: Dependencies
command: pip install requests boto3
- run:
name: Crowler
path: static
command: |
python crowler.py
if [ "$(git diff)" != "" ]; then
exit 1
fi
workflows:
deploy:
jobs:
- trufflehog
- docker:
requires:
- trufflehog
- static:
requires:
- docker