Skip to content

[connector]add trace duration connector #50

[connector]add trace duration connector

[connector]add trace duration connector #50

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: openinsight-release-packages
on:
push:
branches:
- main
- insight-main
tags: ["v*"]
pull_request:
branches:
- main
- insight-main
env:
# Use docker.io for Docker Hub if empty
REGISTRY_SERVER_ADDRESS: ghcr.io/openinsight-proj
REGISTRY_USER_NAME: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_TOKEN }}
jobs:
release-images:
if: github.repository == 'openinsight-proj/opentelemetry-collector-contrib'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 90
env:
TAG: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.8"
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
# refs: https://github.com/FuelLabs/fuel.nix/pull/121
- uses: jlumbroso/free-disk-space@main
- name: Install dependencies
#if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
#if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.ACTIONS_TOKEN }}
- uses: actions/checkout@v4
- run: make genotelcontribcol
- name: Build otel col contrib amd64
run: GOOS=linux GOARCH=amd64 make otelcontribcol && cp ./bin/otelcontribcol_linux_amd64 ./cmd/otelcontribcol_linux_amd64
- name: Build otel col contrib arm64
run: GOOS=linux GOARCH=arm64 make otelcontribcol && cp ./bin/otelcontribcol_linux_arm64 ./cmd/otelcontribcol_linux_arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.REGISTRY_SERVER_ADDRESS }}/opentelemetry-collector-contrib:${{ env.TAG }}