Skip to content

Docker image-export CI #498

Docker image-export CI

Docker image-export CI #498

name: Docker image-export CI
on:
push:
schedule:
- cron: "05 04 * * 1"
jobs:
build:
runs-on: ubuntu-latest
env:
REPO: jgraph/export-server
HTTP_PORT: 32733
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
steps:
- uses: actions/checkout@v3
- name: Build the image-export Docker image
run: |
docker build -f image-export/Dockerfile -t ${REPO} image-export/
docker run --name "image-export" -d -p ${HTTP_PORT}:8000 ${REPO}
sleep 10
docker logs image-export
docker exec image-export /bin/bash -c "curl -i http://localhost:8000"
echo "${DOCKER_PASS}" | docker login -u "${DOCKER_USER}" --password-stdin;
docker tag ${REPO} ${REPO}:latest;
docker push ${REPO}:latest;