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

[target-allocator] Change the github action to match the operator #1347

Merged
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions .chloggen/1298-change-ta-build-proc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: target-allocator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: This PR changes how the target allocator images are released by having all new target allocator changes in a "main" tagged image, with the version tag being generated only on an official release.

# One or more tracking issues related to the change
issues: [1298]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
13 changes: 10 additions & 3 deletions .github/workflows/publish-target-allocator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ jobs:
- uses: actions/checkout@v3

- name: Read version
run: grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "VERSION="$2}' >> $GITHUB_ENV
run: |
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator
tags: |
type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{raw}}
type=ref,event=branch

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -56,7 +61,9 @@ jobs:
context: cmd/otel-allocator
platforms: linux/amd64,linux/arm64
push: true
build-args: version=${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
VERSION_DATE=${{ env.VERSION_DATE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down