Skip to content

[CDS-305] Fix initialisation delay for metadata on ecsattributes proc… #18

[CDS-305] Fix initialisation delay for metadata on ecsattributes proc…

[CDS-305] Fix initialisation delay for metadata on ecsattributes proc… #18

name: OpenTelemetry-ECS-EC2
on:
push:
branches:
- master
paths:
- 'otel-agent/ecs-ec2/Dockerfile'
- 'otel-agent/ecs-ec2/entrypoint.sh'
- '.github/workflows/otel-ecs-image.yml'
- 'otel-agent/ecs-ec2/ecsattributesprocessor/*'
pull_request:
paths:
- 'otel-agent/ecs-ec2/Dockerfile'
- 'otel-agent/ecs-ec2/entrypoint.sh'
- '.github/workflows/otel-ecs-image.yml'
- 'otel-agent/ecs-ec2/ecsattributesprocessor/*'
env:
DOCKERHUB_REGISTRY: coralogixrepo/otel-coralogix-ecs-ec2
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# get upstream version from Dockerfile
# get upstream version from builder yaml file
- name: set image version
id: set-image-version
uses: mikefarah/yq@master
with:
cmd: yq '.dist.version' ./otel-agent/ecs-ec2/ecsattributesprocessor/builder.yaml
- name: Build And Push otel Image To Dockerhub
uses: docker/build-push-action@v2.8.0
with:
context: ./otel-agent/ecs-ec2/
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
tags: |
${{ env.DOCKERHUB_REGISTRY }}:${{ steps.set-image-version.outputs.result }}
${{ env.DOCKERHUB_REGISTRY }}:latest