File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : cd
2
+ on :
3
+ push :
4
+ branches : [main] # FIXME
5
+ tags : ['*.*']
6
+ jobs :
7
+ deploy :
8
+ runs-on : ubuntu-latest
9
+ environment : aws
10
+ env :
11
+ AWS_BUCKET : ${{ vars.AWS_BUCKET }}
12
+ AWS_DEFAULT_REGION : ${{ vars.AWS_DEFAULT_REGION }}
13
+ AWS_ROLE : arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/GitHubActions
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - uses : actions/setup-python@v5
17
+ with :
18
+ python-version : " 3.9"
19
+ # https://docs.aws.amazon.com/lambda/latest/dg/python-layers.html#python-layer-packaging
20
+ - name : Packaging the layer content
21
+ run : |
22
+ python -m venv create_layer
23
+ source create_layer/bin/activate
24
+ pip install -r requirements.txt
25
+ mkdir python
26
+ cp -r create_layer/lib python
27
+ zip -r layer_content.zip python
28
+ - uses : aws-actions/configure-aws-credentials@v2
29
+ with :
30
+ aws-region : ${{ env.AWS_DEFAULT_REGION }}
31
+ role-to-assume : ${{ env.AWS_ROLE }}
32
+ - run : aws s3 cp layer_content.zip s3://${{ env.AWS_BUCKET }}/vtwsclib.zip
You can’t perform that action at this time.
0 commit comments