Skip to content

Workflow file for this run

name: Cloud-Functions Infrastructure Deploy
on:
push:
branches: ["master"]
workflow_dispatch:
branches: ["master"]
permissions:
contents: read
jobs:
files-changed:
name: Infra
runs-on: ubuntu-20.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
infra:
- 'infra/**'
# run only if some file in 'infra' folder was changed
- if: steps.changes.outputs.infra == 'true'
uses: actions/setup-python@v2
with:
python-version: "3.x"
- if: steps.changes.outputs.infra == 'true'
env:
CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
run: |
echo $CREDENTIALS > /tmp/cred.json
python -m pip install --upgrade pip
curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
cd infra
pip install keyrings.google-artifactregistry-auth
pdm build
pip install twine
export GOOGLE_APPLICATION_CREDENTIALS=/tmp/cred.json
twine upload --verbose --skip-existing --repository-url https://us-east4-python.pkg.dev/development-380917/python-repos/ dist/*