Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
test releasing docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandem committed Aug 13, 2024
1 parent d67707b commit c1e209d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,36 @@ jobs:
publish:
env:
RELEASE_VERSION: ${{ github.event_name == 'pull_request' && 'dev-test' || 'dev' }}
REGISTRY: ghcr.io
IMAGE_NAME: datadog/otel-profiling-agent
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'publish-dev-test') )}}
name: Publish pre-release
needs: [build]
runs-on: ubuntu-24.04
permissions:
contents: write
packages: write
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
annotations: |
org.opencontainers.image.description=The Datadog OpenTelemetry Profiling Agent is a full-host profiler that collects and sends profiling data to Datadog
org.opencontainers.image.vendor=Datadog
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create assets
Expand Down Expand Up @@ -305,3 +330,12 @@ jobs:
prerelease: true
draft: false
tag: ${{ env.RELEASE_VERSION }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.release
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}

0 comments on commit c1e209d

Please sign in to comment.