Skip to content

Run Ontology Bump Dry Run #11

Run Ontology Bump Dry Run

Run Ontology Bump Dry Run #11

name: Run Ontology Bump Dry Run
on:
workflow_dispatch
permissions:
id-token: write
contents: write
jobs:
ontology-dry-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --extra-index-url https://test.pypi.org/simple/ -r scripts/schema_bump_dry_run_ontologies/requirements.txt
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_PROD_ROLE_TO_ASSUME }}
role-duration-seconds: 2700
- name: Pull AWS Secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids:
AUTH0_SECRETS, corpora/backend/prod/auth0-secret
- name: Run Dry-Run Script
run: python3 -m scripts.schema_bump_dry_run_ontologies.ontology_bump_dry_run
env:
corpus_env: "prod"
- name: Store JSON with Replaced By Ontology Term Mappings
uses: actions/cache/save@v4
with:
path: "./replaced-by.json"
key: replaced-by-map
- name: upload dry run to slack
run: |
curl -F [email protected] -F "initial_comment=Ontology Dry Run Report" -F channels=${{secrets.SLACK_CURATOR_REPORTING_CHANNEL}} -H "Authorization: Bearer ${{secrets.SLACK_CURATOR_REPORTING_APP_AUTH}}" https://slack.com/api/files.upload