adding spot detection process name (#97) #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish models to prod | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/aind_data_schema_models/_generators/models/**' | |
jobs: | |
publish_models: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
AWS_DATA_SCHEMA_MODELS_ROLE: ${{ secrets.AWS_DATA_SCHEMA_MODELS_ROLE_PROD }} | |
DB_NAME: ${{ vars.DB_NAME_PROD }} | |
DOCDB_READWRITE_SECRET: ${{ vars.DOCDB_READWRITE_SECRET_PROD }} | |
DOCDB_SSH_TUNNEL_SECRET: ${{ vars.DOCDB_SSH_TUNNEL_SECRET_PROD }} | |
AWS_DEFAULT_REGION : ${{ vars.AWS_REGION_PROD }} | |
PATH_TO_MODELS: ${{ vars.PATH_TO_MODELS }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Pull latest changes | |
run: git pull origin main | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ env.AWS_DATA_SCHEMA_MODELS_ROLE }} | |
role-session-name: github-schema-upload-session | |
aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -e .[build] | |
- name: Publish models to docdb | |
run: | | |
python ./scripts/write_to_docdb.py |