Skip to content

Dike buildimage

Dike buildimage #8

Workflow file for this run

name: Docker Image CI
on:
pull_request:
branches: [ develop ]
env:
REGION: us-east-1
ECR_REGISTRY_ID: 346509735976
# AWS_ASSUMED_ROLE_ARN: arn:aws:iam::553885929720:role/tf_nodereal_prod_ecr_cicd_deployment_assume_role
jobs:
build:
runs-on: [self-hosted,qa-cicd-runners]
steps:
- uses: actions/checkout@v2
- name: Build the Docker image to Amazon ECR
run: |
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com
docker build --build-arg profile=prod --build-arg GIT_TOKEN=${{ secrets.GO_MODULES_TOKEN }} -t ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/${GITHUB_REPOSITORY#*/}:${GITHUB_SHA} .
docker push ${ECR_REGISTRY_ID}.dkr.ecr.${REGION}.amazonaws.com/${GITHUB_REPOSITORY#*/}:${GITHUB_SHA}