-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.42 KB
/
logs-to-tsdb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 "latest"
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:latest
docker push 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:latest
# now build the kinesis one - temporary transition while we have both
docker build -f Dockerfile.kinesis -t 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:kinesis logs-to-tsdb/
docker push 967314784947.dkr.ecr.us-east-2.amazonaws.com/data-pipes-logs:kinesis