Skip to content

simple growth api

simple growth api #45

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- deploy
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Docker login
uses: docker/login-action@v1
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.USER }}
password: ${{ secrets.TOKEN }}
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Docker build
run: |
docker build -t ${{ secrets.DOCKER_URL }}/$GITHUB_REPOSITORY:latest -f docker/engine/Dockerfile .
- name: Docker push latest
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker push ${{ secrets.DOCKER_URL }}/$GITHUB_REPOSITORY:latest
- name: Docker push production
if: ${{ github.ref == 'refs/heads/deploy' }}
run: |
docker tag ${{ secrets.DOCKER_URL }}/$GITHUB_REPOSITORY:latest ${{ secrets.DOCKER_URL }}/$GITHUB_REPOSITORY:production
docker push ${{ secrets.DOCKER_URL }}/$GITHUB_REPOSITORY:production