Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manual publish of Service Extension image #3151

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/service-extensions-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
workflow_dispatch:
inputs:
tag_name:
description: 'Docker image tag to use for the package'
required: true
default: 'dev'
description: 'Docker image tag to use for the package (default to selected branch name)'
required: false
commit_sha:
description: 'Commit SHA to checkout'
required: true
description: 'Commit SHA to checkout (default to latest commit on selected branch)'
required: false
set_as_latest:
description: 'Set the tag as latest'
required: false
Expand All @@ -23,9 +22,8 @@ permissions:
packages: write

env:
TAG_NAME: ${{ github.ref_name || github.event.inputs.tag_name }}
REF_NAME: ${{ github.ref || github.event.inputs.commit_sha }}
COMMIT_SHA: ${{ github.sha || github.event.inputs.commit_sha }}
TAG_NAME: ${{ github.event.inputs.tag_name || github.ref_name }}
COMMIT_SHA: ${{ github.event.inputs.commit_sha || github.sha }}
PUSH_LATEST: ${{ github.event.inputs.set_as_latest || 'true' }}
REGISTRY_IMAGE: ghcr.io/datadog/dd-trace-go/service-extensions-callout

Expand All @@ -45,7 +43,7 @@ jobs:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.REF_NAME }}
ref: ${{ env.COMMIT_SHA }}

- name: Install Docker (only arm64)
if: matrix.platform == 'linux/arm64'
Expand Down Expand Up @@ -119,9 +117,13 @@ jobs:
id: tags
run: |
tagname=${TAG_NAME//\//-} # remove slashes from tag name
echo "tags=-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${tagname} \
-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${{ env.COMMIT_SHA }} \
${{ env.PUSH_LATEST == 'true' && '-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:latest' }}" >> $GITHUB_OUTPUT
tags="tags=-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${tagname} \
-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${{ env.COMMIT_SHA }}"
if [ "${PUSH_LATEST}" == "true" ]; then
tags="$tags -t ghcr.io/datadog/dd-trace-go/service-extensions-callout:latest"
fi

echo $tags >> $GITHUB_OUTPUT

- name: Create manifest list and push
working-directory: /tmp/digests
Expand Down
Loading