Skip to content

Commit

Permalink
Add new gitAction to push docker images to dockerhub (#191)
Browse files Browse the repository at this point in the history
* feat(gitAction): add new gitAcion to push docker images to dockerhub

* fix(gitAction): don't even need python

* fix(gitAction) : name of the branch

* refactor(gitAction): cleanup name branch
  • Loading branch information
RonanMorgan authored Apr 24, 2024
1 parent f746d0a commit 25bd5ad
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-push-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Push Docker Image

on:
pull_request:
types: [closed]
branches:
- develop
push:
branches:
- develop

jobs:
build_and_push_image:
name: Build and Push Docker Image
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_PW }}" | docker login -u "${{ secrets.DOCKERHUB_LOGIN }}" --password-stdin

- name: Build Docker image
run: make build

- name: Push Docker image
run: docker push pyronear/pyro-engine:latest
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ single-docs:
sphinx-build docs/source docs/_build -a

# Build the docker
docker:
build:
docker build . -t pyronear/pyro-engine:python3.8.1-slim
docker build . -t pyronear/pyro-engine:latest

# Run the engine wrapper
run:
docker build . -t pyronear/pyro-engine:latest
docker-compose up -d
docker compose up -d

# Get log from engine wrapper
log:
docker logs -f --tail 50 pyro-engine_pyro-engine_1

# Stop the engine wrapper
stop:
docker-compose down
docker compose down

0 comments on commit 25bd5ad

Please sign in to comment.