Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 60 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Satire Pulp parser

on: [push]
on:
push:
branches:
- "**"
pull_request:

jobs:
lint:
Expand Down Expand Up @@ -51,4 +55,58 @@ jobs:
run: pip install -r requirements.txt

- name: Run Pytest
run: pytest -v
run: pytest -v

push_branch_dev_to_docker_hub:
name: Build and Push Docker(dev)
runs-on: ubuntu-latest
needs: lint

if: github.ref == 'refs/heads/dev'

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
dmsn/satire_pulp_parser:dev

push_branch_main_to_docker_hub:
name: Build and Push Docker(prod)
runs-on: ubuntu-latest
needs: lint

if: github.ref == 'refs/heads/main'

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
dmsn/satire_pulp_parser:prod