This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
Merge pull request #145 from FerranMarin/FerranMarin-patch-1 #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI to Docker Hub | |
on: | |
push: { branches: main } | |
jobs: | |
test-and-push: | |
name: Run tests | |
runs-on: ubuntu-latest | |
env: | |
COMPOSE_FILE: axie-scholar-utilities/docker/docker-compose.yml | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Build test docker images | |
run: docker-compose build tests | |
- name: Run tests | |
run: docker-compose run tests | |
- name: Build prod docker image | |
run: docker-compose build scholar-utilities | |
- name: Tag prod image | |
run: docker tag axie-scholar-utilities epith/axie-scholar-utilities | |
- name: Login to DockerHub | |
run: docker login -u $DOCKER_USER -p $DOCKER_PASS | |
- name: Push prod image to DockerHub | |
run: docker push epith/axie-scholar-utilities |