Skip to content

Merge pull request #246 from USACE/fix/uploader-datalogger-mapper-pdf… #175

Merge pull request #246 from USACE/fix/uploader-datalogger-mapper-pdf…

Merge pull request #246 from USACE/fix/uploader-datalogger-mapper-pdf… #175

Workflow file for this run

name: Build and push MIDAS API images develop
on:
push:
branches: [develop]
paths:
- "compose.sh"
- "api/**"
- "report/**"
- ".github/workflows/api-develop.yml"
jobs:
TestBuildPush:
name: Test Build Push
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v2
- name: Configure AWS credentials
if: ${{ always() }}
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CWBICI_DEVELOP_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.CWBICI_DEVELOP_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.CWBICI_DEVELOP_AWS_REGION }}
- name: Run Tests
run: |
cp .env.example .env
./compose.sh test
- name: Login to Amazon ECR
if: ${{ success() }}
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR (midas-api)
if: ${{ success() }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
./compose.sh build develop push $ECR_REGISTRY
- name: Logout of Amazon ECR
if: ${{ always() }}
run: docker logout ${{ steps.login-ecr.outputs.registry }}