Skip to content

Commit

Permalink
ci: build Docker image on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Jun 20, 2023
1 parent 6e89c95 commit 756b60e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build Dockerfile

on: push

jobs:
build:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v3
- name: Build Dockerfile
run: docker build . -t plotly
- name: Run Docker image
run: |
CONTAINER_ID=$(docker run --rm -d -p 3000:3000 --net=host plotly)
curl -X POST -i 127.0.0.1:3000/ --data '{ "x": ["2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00"], "y": [1, 3, 6], "type": "scatter" }'
docker stop -t 1 "$CONTAINER_ID"

0 comments on commit 756b60e

Please sign in to comment.