11name : Satire Pulp parser
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - " **"
7+ pull_request :
48
59jobs :
610 lint :
5155 run : pip install -r requirements.txt
5256
5357 - name : Run Pytest
54- run : pytest -v
58+ run : pytest -v
59+
60+ push_branch_dev_to_docker_hub :
61+ name : Build and Push Docker(dev)
62+ runs-on : ubuntu-latest
63+ needs : lint
64+
65+ if : github.ref == 'refs/heads/dev'
66+
67+ steps :
68+ - name : Check out the repo
69+ uses : actions/checkout@v4
70+
71+ - name : Setup Docker Buildx
72+ uses : docker/setup-buildx-action@v3
73+
74+ - name : Login to Docker
75+ uses : docker/login-action@v3
76+ with :
77+ username : ${{ secrets.DOCKER_USERNAME }}
78+ password : ${{ secrets.DOCKER_PASSWORD }}
79+
80+ - name : Push to Docker Hub
81+ uses : docker/build-push-action@v5
82+ with :
83+ push : true
84+ tags : |
85+ dmsn/satire_pulp_parser:dev
86+
87+ push_branch_main_to_docker_hub :
88+ name : Build and Push Docker(prod)
89+ runs-on : ubuntu-latest
90+ needs : lint
91+
92+ if : github.ref == 'refs/heads/main'
93+
94+ steps :
95+ - name : Check out the repo
96+ uses : actions/checkout@v4
97+
98+ - name : Setup Docker Buildx
99+ uses : docker/setup-buildx-action@v3
100+
101+ - name : Login to Docker
102+ uses : docker/login-action@v3
103+ with :
104+ username : ${{ secrets.DOCKER_USERNAME }}
105+ password : ${{ secrets.DOCKER_PASSWORD }}
106+
107+ - name : Push to Docker Hub
108+ uses : docker/build-push-action@v5
109+ with :
110+ push : true
111+ tags : |
112+ dmsn/satire_pulp_parser:prod
0 commit comments