diff --git a/.github/workflows/layer-publish.yml b/.github/workflows/layer-publish.yml index 6e8016c13f..5cdb3db866 100644 --- a/.github/workflows/layer-publish.yml +++ b/.github/workflows/layer-publish.yml @@ -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 diff --git a/.github/workflows/release-layer-collector.yml b/.github/workflows/release-layer-collector.yml index 420d18ed68..d43db3c87c 100644 --- a/.github/workflows/release-layer-collector.yml +++ b/.github/workflows/release-layer-collector.yml @@ -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 @@ -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::486140753397:layer:logzio-opentelemetry-collector-amd64-${COLLECTOR_VERSION//./_}:1\n" + MESSAGE+="arn:aws:lambda::486140753397:layer:logzio-opentelemetry-collector-amd64-${COLLECTOR_VERSION//./_}:$LAYER_VERSION\n" MESSAGE+="\`\`\`\n\n" MESSAGE+="#### 📱 **arm64**\n" MESSAGE+="\`\`\`\n" - MESSAGE+="arn:aws:lambda::486140753397:layer:logzio-opentelemetry-collector-arm64-${COLLECTOR_VERSION//./_}:1\n" + MESSAGE+="arn:aws:lambda::486140753397:layer:logzio-opentelemetry-collector-arm64-${COLLECTOR_VERSION//./_}:$LAYER_VERSION\n" MESSAGE+="\`\`\`\n\n" # Append the message to the release notes