Skip to content

fix: typo in release workflow (#35) #2

fix: typo in release workflow (#35)

fix: typo in release workflow (#35) #2

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
versions:
name: Determine versions
runs-on: ubuntu-24.04
outputs:
go-version: ${{ steps.go-version.outputs.version }}
profiler-version: ${{ steps.profiler-version.outputs.version }}
steps:
- name: Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get Go version from go.mod file
id: go-version
run: echo "version=$(go mod edit -json | jq -r .Go)" >> "${GITHUB_OUTPUT}"
- name: Compute profiler version
id: profiler-version
run: echo "version=${{ github.ref_name }}-${GITHUB_SHA::7}.${{ github.run_id }}" >> "${GITHUB_OUTPUT}"
build:
name: Build
needs: [versions]
uses: ./.github/workflows/build.yml
with:
go-version: ${{ needs.versions.outputs.go-version }}
profiler-version: ${{ needs.versions.outputs.profiler-version }}
secrets: inherit
permissions:
contents: read
pull-requests: write
release:
env:
REGISTRY: ghcr.io
IMAGE_NAME: datadog/dd-otel-host-profiler
RELEASE_VERSION: ${{ github.ref_name }}
needs: build
name: Release
runs-on: ubuntu-24.04
permissions:
actions: read
contents: write
packages: write
steps:
- name: Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
annotations: |
org.opencontainers.image.description=The Datadog OpenTelemetry Profiler 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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- name: Create assets
run: |
tar czf dd-otel-host-profiler-${RELEASE_VERSION}-aarch64.tar.gz -C agent-aarch64 .
tar czf dd-otel-host-profiler-${RELEASE_VERSION}-x86_64.tar.gz -C agent-x86_64 .
sha256sum dd-otel-host-profiler-${RELEASE_VERSION}-aarch64.tar.gz dd-otel-host-profiler-${RELEASE_VERSION}-x86_64.tar.gz > sha256sums.txt
- name: Create Release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
artifacts: "dd-otel-host-profiler-v*.tar.gz,sha256sums.txt"
allowUpdates: true
omitBody: true
draft: true
tag: ${{ env.RELEASE_VERSION }}
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
file: docker/Dockerfile.release
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}