Skip to content

Commit

Permalink
Create dockerpushandrun.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsk4 authored Dec 14, 2022
1 parent baba5fe commit 48e4f50
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/dockerpushandrun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CD to Docker
on:
push:
branches: [ main ]
paths: 'DeFi-Data-Engine/**'
workflow_dispatch:

jobs:
buildDocker:
runs-on: [ self-hosted ]
defaults:
run:
working-directory: "DeFi-Data-Engine/"

steps:
- uses: actions/checkout@v3

- name: Stop Existing Images
run: sudo docker compose down

- name: Build
run: sudo docker compose build

- name: Push to Docker
run: sudo docker compose push

runDocker:
needs: buildDocker
runs-on: [ self-hosted ]

- name: Run Docker Compose
run: sudo docker compose up

0 comments on commit 48e4f50

Please sign in to comment.