Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new gitAction to push docker images to dockerhub #191

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
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
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
Loading