name: Build and Publish Docker on: workflow_dispatch jobs: publish-image: runs-on: ubuntu-latest env: OWNER: openbb-finance IMAGE: openbbterminal-poetry steps: - uses: actions/checkout@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build the Docker image run: | source docker/compose.env docker-compose -f docker/docker-compose.yaml build docker tag `docker images -q ghcr.io/$OWNER/$IMAGE` ghcr.io/$OWNER/$IMAGE:$OPENBBTERMINAL_DOCKER_POETRY_VERSION docker run ghcr.io/$OWNER/$IMAGE:$OPENBBTERMINAL_DOCKER_POETRY_VERSION docker push ghcr.io/$OWNER/$IMAGE:$OPENBBTERMINAL_DOCKER_POETRY_VERSION