Skip to content

update python workflow #38

update python workflow

update python workflow #38

Workflow file for this run

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: Use Python ${{ matrix.python-version }}.x
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- 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: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64, amd64
- 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 }}