Skip to content

Commit

Permalink
[target-allocator] Change the github action to match the operator (#1347
Browse files Browse the repository at this point in the history
)

* Change the github action to match the operator

* Add chloggen
  • Loading branch information
jaronoff97 committed Jan 5, 2023
1 parent 74581ea commit b20661c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
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

0 comments on commit b20661c

Please sign in to comment.