Merge pull request #269 from alan-turing-institute/model-plotting #104
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: "Build and push frontend to Docker image" | |
on: | |
push: | |
branches: [main, develop, test-actions] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- name: 'Build main' | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
docker build -f dockerfiles/Dockerfile.frontend -t turingcropapp/dtbase-frontend:main . | |
docker push turingcropapp/dtbase-frontend:main | |
- name: 'Build dev' | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
run: | | |
docker build -f dockerfiles/Dockerfile.frontend -t turingcropapp/dtbase-frontend:dev . | |
docker push turingcropapp/dtbase-frontend:dev | |
- name: 'Build test-actions' | |
if: ${{ github.ref == 'refs/heads/test-actions' }} | |
run: | | |
docker build -f dockerfiles/Dockerfile.frontend -t turingcropapp/dtbase-frontend:test-actions . | |
docker push turingcropapp/dtbase-frontend:test-actions |