Skip to content

Commit

Permalink
auto update layer version
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama committed Jan 14, 2025
1 parent 3bddd84 commit 1c63290
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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
14 changes: 12 additions & 2 deletions .github/workflows/release-layer-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 1c63290

Please sign in to comment.