Skip to content

Commit

Permalink
[DEV] update release workflow layer name and dynamic version
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama authored Jan 14, 2025
2 parents 67c0b72 + 1c63290 commit 9e25636
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/layer-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,11 @@ jobs:
--principal "*" \
--statement-id publish \
--action lambda:GetLayerVersion
echo "${LAYER_VERSION}" > layer-version.txt
- name: Upload Layer Version artifact
uses: actions/upload-artifact@v4
if: ${{ inputs.architecture == 'amd64' && inputs.aws_region == 'us-east-1' }}
with:
name: layer-version
path: layer-version.txt
16 changes: 13 additions & 3 deletions .github/workflows/release-layer-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- us-west-2
with:
artifact-name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip
layer-name: opentelemetry-collector
layer-name: logzio-opentelemetry-collector
component-version: ${{needs.build-layer.outputs.COLLECTOR_VERSION}}
architecture: ${{ matrix.architecture }}
release-group: prod
Expand All @@ -96,19 +96,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download Layer version
uses: actions/download-artifact@v4
with:
name: layer-version

- name: Read Layer version
id: layer-version
run: echo "::set-output name=version::$(cat layer-version.txt)"

- name: Append Layer ARNs to Release Body
run: |
COLLECTOR_VERSION=${{ needs.build-layer.outputs.COLLECTOR_VERSION }}
LAYER_VERSION=${{ steps.layer-version.outputs.version }}
MESSAGE="### Lambda Layers for OpenTelemetry Collector (${COLLECTOR_VERSION})\n\n"
MESSAGE+="The following Lambda layers are available for this release. Use the appropriate ARN for your Lambda architecture:\n\n"
MESSAGE+="#### 🖥️ **amd64 (x86_64)**\n"
MESSAGE+="\`\`\`\n"
MESSAGE+="arn:aws:lambda:<region>:486140753397:layer:logzio-opentelemetry-collector-amd64-${COLLECTOR_VERSION//./_}:1\n"
MESSAGE+="arn:aws:lambda:<region>:486140753397:layer:logzio-opentelemetry-collector-amd64-${COLLECTOR_VERSION//./_}:$LAYER_VERSION\n"
MESSAGE+="\`\`\`\n\n"
MESSAGE+="#### 📱 **arm64**\n"
MESSAGE+="\`\`\`\n"
MESSAGE+="arn:aws:lambda:<region>:486140753397:layer:logzio-opentelemetry-collector-arm64-${COLLECTOR_VERSION//./_}:1\n"
MESSAGE+="arn:aws:lambda:<region>:486140753397:layer:logzio-opentelemetry-collector-arm64-${COLLECTOR_VERSION//./_}:$LAYER_VERSION\n"
MESSAGE+="\`\`\`\n\n"
# Append the message to the release notes
Expand Down

0 comments on commit 9e25636

Please sign in to comment.