generate new image #44
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: Publish Logs-to-Tsdb Docker Image | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'logs-to-tsdb/**' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to Public ECR | |
uses: docker/login-action@v1 | |
with: | |
registry: 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs | |
username: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Build and Push Docker image | |
env: | |
ECR_REPOSITORY: data-pipes-logs | |
IMAGE_TAG: ${{ github.sha }} | |
AWS_REGION: us-east-2 | |
run: | | |
docker build -t 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:$IMAGE_TAG logs-to-tsdb/ | |
docker push 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:$IMAGE_TAG | |
# Tag and push as "kinesis" for now | |
docker tag 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:$IMAGE_TAG 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:kinesis | |
docker push 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:kinesis | |