forked from newrelic/newrelic-lambda-layers
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.47 KB
/
publish-python.yml
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
name: Publish Python Layers
on:
push:
tags:
- v**_python
jobs:
publish-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- name: Check Tag
id: python-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_python$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Install python dependencies
if: steps.python-check-tag.outputs.match == 'true'
run: pip install -U awscli
- name: Publish Python ${{ matrix.python-version }} layer
if: steps.python-check-tag.outputs.match == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cd python
./publish-layers.sh python${{ matrix.python-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64, amd64
- name: Publish ECR image for python${{ matrix.python-version }}
if: steps.python-check-tag.outputs.match == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cd nodejs
./publish-layers.sh publish-docker-ecr-image-python${{ matrix.python-version }}