Skip to content

Build traffcap

Build traffcap #49

Workflow file for this run

name: Build traffcap
on:
push:
branches: ["master"]
tags: ['*']
pull_request:
branches: ["master"]
jobs:
build:
name: Build, lint and test...
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -
pdm install
- name: Lint with Ruff
run: pdm run lint
- name: Test with pytest
run: pdm run test
push_to_docker_hub:
name: Push Docker image to Docker Hub...
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: centurix/traffcap:latest
# push_to_ghcr:
# name: Push Docker image to GHCR
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Check out the repo
# uses: actions/checkout@v4
# - name: Log in to GHCR
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: huh-sters/traffcap:latest