Skip to content

Automatic update of offsets.json (#956) #747

Automatic update of offsets.json (#956)

Automatic update of offsets.json (#956) #747

# TODO: trigger only if testing or any other checks previously succeeded
name: Push to DockerHub (main)
on:
push:
tags:
- "v*.*.*"
branches:
- main
permissions:
contents: read
jobs:
build-and-push-image:
if: github.repository == 'open-telemetry/opentelemetry-ebpf-instrumentation'
permissions:
id-token: write
packages: write
runs-on: ubuntu-latest
env:
IMAGE_NAME: ebpf-instrument
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Log in to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN_EBPF_INSTRUMENTATION }}
- name: Log in to the Container registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: |
otel/${{ env.IMAGE_NAME }}
ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64