-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.13 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
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