Skip to content

Initial

Initial #2

Workflow file for this run

name: Build Docker Container
on:
push:
branches:
- main
paths:
- infra/cloudcustodian/docker/**
- policies/schedule-based/**
- .github/workflows/docker.yml
jobs:
docker:
runs-on: [ self-hosted, ubuntu ]
steps:
- uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-skip-session-tagging: true
role-to-assume: <<CI_ROLE_HERE>>
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: "true" # see: https://github.com/aws-actions/amazon-ecr-login#docker-credentials
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: governance
IMAGE_TAG: latest
run: |
docker build --platform=linux/amd64 -t $REGISTRY/$REPOSITORY:$IMAGE_TAG -f infra/cloudcustodian/docker/Dockerfile .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG