Skip to content

Merge pull request #60 from sammrai/dependabot/pip/ccxt-4.3.85 #29

Merge pull request #60 from sammrai/dependabot/pip/ccxt-4.3.85

Merge pull request #60 from sammrai/dependabot/pip/ccxt-4.3.85 #29

name: Create and publish a Docker image
on:
push:
branches:
- "main"
- "test"
jobs:
docker-build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ github.repository }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ github.repository }}:${{ github.sha }}
${{ github.repository }}:latest
- name: Build and push for test branch
if: github.ref == 'refs/heads/test'
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ github.repository }}:${{ github.sha }}
${{ github.repository }}:test
- name: Run tests
run: |
docker pull ${{ github.repository }}:${{ github.sha }}
docker run --rm ${{ github.repository }}:${{ github.sha }} --exchanges kucoin kraken --symbols BTC/USDT ETH/USDT