bump go => 1.21; apply patches #84
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 MIDAS API images develop | |
on: | |
push: | |
branches: [develop] | |
paths: | |
- "api/**" | |
- ".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: ./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 }} | |
API_ECR_REPOSITORY: midas-api | |
TELEMETRY_ECR_REPOSITORY: midas-telemetry | |
ALERT_ECR_REPOSITORY: midas-alert | |
DCSLOADER_ECR_REPOSITORY: midas-dcs-loader | |
run: | | |
docker build --target core -t $ECR_REGISTRY/$API_ECR_REPOSITORY:develop api | |
docker build --target telemetry -t $ECR_REGISTRY/$TELEMETRY_ECR_REPOSITORY:develop api | |
docker build --target alert -t $ECR_REGISTRY/$ALERT_ECR_REPOSITORY:develop api | |
docker build --target dcs-loader -t $ECR_REGISTRY/$DCSLOADER_ECR_REPOSITORY:develop api | |
docker push -a $ECR_REGISTRY/$API_ECR_REPOSITORY | |
docker push -a $ECR_REGISTRY/$TELEMETRY_ECR_REPOSITORY | |
docker push -a $ECR_REGISTRY/$ALERT_ECR_REPOSITORY | |
docker push -a $ECR_REGISTRY/$DCSLOADER_ECR_REPOSITORY | |
- name: Logout of Amazon ECR | |
if: ${{ always() }} | |
run: docker logout ${{ steps.login-ecr.outputs.registry }} |