This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
Updating notebook download #146
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
# Builds the Docker Image and pushes it into an Amazon ECR Repo | |
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
env: | |
AIEVENTS_REGISTRY: 994687633865.dkr.ecr.us-west-2.amazonaws.com/aievents | |
AWS_REGION: us-west-2 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
jobs: | |
dockerize: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get AI-Event-Monitoring Code | |
uses: actions/checkout@v2 | |
with: | |
repository: asfadmin/AI-Event-Monitoring | |
path: ./AI-Event-Monitoring/ | |
ref: 'main' | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Login to Amazon ECR | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build, tag, and push image to Amazon ECR | |
run: | | |
export CI_JOB_TIMESTAMP=$(date --utc --rfc-3339=seconds) | |
echo "Building ${AIEVENTS_REGISTRY}" | |
docker build --no-cache \ | |
-t ${AIEVENTS_REGISTRY} \ | |
--label org.opencontainers.image.created="${CI_JOB_TIMESTAMP}" \ | |
--label org.opencontainers.image.revision="${GITHUB_SHA}" . | |
docker push ${AIEVENTS_REGISTRY} | |
- name: Logout of Amazon ECR | |
if: always() | |
run: docker logout ${AIEVENTS_REGISTRY} |