-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow to publish the error reporter to ECR #1564
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Ingestion error reporter deploy | ||
|
||
on: | ||
push: | ||
branches: [main, '*-stable'] | ||
paths: | ||
- '.github/workflows/ingestion-error-reporter-deploy.yml' | ||
- 'ingestion/monitoring/errorLogsToSlack.py' | ||
- 'ingestion/monitoring/pyproject.toml' | ||
- 'ingestion/monitoring/poetry.lock' | ||
# Build whenever a new tag is created. | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
branches: [main, '*-stable'] | ||
paths: | ||
- '.github/workflows/ingestion-error-reporter-deploy.yml' | ||
- 'ingestion/monitoring/errorLogsToSlack.py' | ||
- 'ingestion/monitoring/pyproject.toml' | ||
- 'ingestion/monitoring/poetry.lock' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
iamleeg
Author
Contributor
|
||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build, tag, and push image to Amazon ECR (latest) | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
working-directory: ingestion/functions | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: gdh-ingestor-error-reporter | ||
IMAGE_TAG: ${{ github.sha }} | ||
run: | | ||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY -f Dockerfile-clean . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest | ||
- name: Build, tag, and push image to Amazon ECR (stable) | ||
if: ${{ endsWith(github.ref, '-stable') }} | ||
working-directory: ingestion/functions | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: gdh-ingestor-error-monitor | ||
IMAGE_TAG: ${{ github.sha }} | ||
run: | | ||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:stable -f Dockerfile-clean . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:stable |
eu-central-1? one less thing to migrate, but possible eu-central-1 ECR might not have access to us-east-1 logs.