-
Notifications
You must be signed in to change notification settings - Fork 24
52 lines (49 loc) · 1.81 KB
/
ontology-bump-dry-run.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
45
46
47
48
49
50
51
52
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@v3
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Python cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r scripts/schema_bump_dry_run_ontologies/requirements.txt --extra-index-url https://test.pypi.org/simple/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
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@v1
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@v3
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