add production env to start:prod script #65
Workflow file for this run
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 database docker image | |
on: | |
push: | |
paths: | |
- 'database/**' | |
workflow_dispatch: | |
env: | |
PG_H3_VERSION: 3.7.2 | |
jobs: | |
testing-api: | |
name: Build database docker image | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push to Docker Hub | |
uses: docker/build-push-action@v2 | |
with: | |
context: database | |
push: true | |
tags: vizzuality/landgriffon-database:${{ github.ref != 'refs/heads/main' && 'staging' || 'production' }} | |
- name: Push "latest" tag to Docker Hub | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/build-push-action@v2 | |
with: | |
context: database | |
push: true | |
tags: vizzuality/landgriffon-database:latest |