Skip to content

[autoinstrumentation] remove dependency on busybox, use native cp #6

[autoinstrumentation] remove dependency on busybox, use native cp

[autoinstrumentation] remove dependency on busybox, use native cp #6

name: "Publish cp Auto-Instrumentation"
on:
push:
paths:
- 'autoinstrumentation/cp/**'
- '.github/workflows/publish-autoinstrumentation-cp.yaml'
branches:
- main
pull_request:
paths:
- 'autoinstrumentation/cp/**'
- '.github/workflows/publish-autoinstrumentation-cp.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-22.04
services:
# Start a local registry for pushing the multiarch manifest and images
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
- name: Read version
run: echo "VERSION=$(cat autoinstrumentation/cp/version.txt)" >> $GITHUB_ENV
- uses: docker/setup-buildx-action@v3
id: multiarch-otelcol-builder
with:
driver: docker-container # Create a builder with the docker-container driver required for multiarch builds
driver-opts: network=host # Required for the builder to push to the local registry service
- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create docker image
run: |
cd autoinstrumentation/cp
VERSION=${{ env.VERSION }} REPOSITORY=localhost:5000 make docker
- name: Push
run: |
docker tag localhost:5000/cp:${{ env.VERSION }} ghcr.io/open-telemetry/opentelemetry-operator/cp:${{ env.VERSION }}
docker tag localhost:5000/cp:${{ env.VERSION }}-fips ghcr.io/open-telemetry/opentelemetry-operator/cp:${{ env.VERSION }}-fips
docker push ghcr.io/open-telemetry/opentelemetry-operator/cp:${{ env.VERSION }}
docker push ghcr.io/open-telemetry/opentelemetry-operator/cp:${{ env.VERSION }}-fips