Repository navigation
118 lines (107 loc) · 3.29 KB
/
Copy pathrelease-layer-python.yml
File metadata and controls
118 lines (107 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: "Release Python Lambda Layer"
on:
# (Using tag push instead of release to allow filtering by tag prefix.)
push:
tags:
- layer-python/**
permissions:
contents: read
jobs:
build-layer:
runs-on: ubuntu-26.04
outputs:
component-version: ${{ steps.build.outputs.component-version }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/build-python-layer
id: build
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
name: Save assembled layer to build
with:
name: opentelemetry-python-layer.zip
path: ${{ steps.build.outputs.artifact-path }}
integration-test:
permissions:
contents: read
id-token: write
needs: build-layer
uses: $/.github/workflows/integration-test.yml
with:
language: python
use-existing-layer-artifact: true
secrets:
INTEGRATION_TEST_ROLE_ARN: ${{ secrets.INTEGRATION_TEST_ROLE_ARN }}
create-release:
permissions:
contents: write
runs-on: ubuntu-26.04
needs: [build-layer, integration-test]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Create Release
run: gh release create "$GITHUB_REF_NAME" --draft --title "$GITHUB_REF_NAME"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: opentelemetry-python-layer.zip
- name: Add Binary to Release
run: gh release upload "$GITHUB_REF_NAME" opentelemetry-python-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-layer:
permissions: # required by the reusable workflow
contents: read
id-token: write
uses: $/.github/workflows/layer-publish.yml
needs: [build-layer, create-release]
strategy:
matrix:
aws_region:
- af-south-1
- ap-east-1
- ap-east-2
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-south-1
- ap-south-2
- ap-southeast-1
- ap-southeast-2
- ap-southeast-3
- ap-southeast-4
- ap-southeast-5
- ap-southeast-6
- ap-southeast-7
- ca-central-1
- ca-west-1
- eu-central-1
- eu-central-2
- eu-north-1
- eu-south-1
- eu-south-2
- eu-west-1
- eu-west-2
- eu-west-3
- il-central-1
- me-central-1
- me-south-1
- mx-central-1
- sa-east-1
- us-east-1
- us-east-2
- us-west-1
- us-west-2
with:
artifact-name: opentelemetry-python-layer.zip
layer-name: opentelemetry-python
component-version: ${{ needs.build-layer.outputs.component-version }}
release-group: prod
aws_region: ${{ matrix.aws_region }}
secrets:
OTEL_LAMBDA_LAYER_PUBLISH_ROLE_ARN: ${{ secrets.OTEL_LAMBDA_LAYER_PUBLISH_ROLE_ARN }}
PROD_LAMBDA_ROLE_ARN: ${{ secrets.PROD_LAMBDA_ROLE_ARN }}