Skip to content

gather-schema-changes #365

gather-schema-changes

gather-schema-changes #365

name: gather-schema-changes
# Use the data file prepared by workflow get-release-versions.
# For each module, compare its changes for API schema and DB schema
# between latest release and current mainline.
on:
schedule:
- cron: '20 03 * * 1,4'
workflow_dispatch:
jobs:
job_1:
name: Compare and publish
runs-on: ubuntu-latest
env:
WF_HOME: ".github/workflows/gather-schema-changes"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Python dependencies
run: |
python -V
python -m pip install --upgrade pip
pip install -r $WF_HOME/requirements.txt
- name: Install yarn dependencies
run: |
yarn --cwd $WF_HOME install
yarn --cwd $WF_HOME list --pattern @apidevtools
- name: Install Go dependencies
run: |
go install github.com/josephburnett/jd@latest
- name: Run script
run: |
export PATH=$PATH:$(go env GOPATH)/bin
python $WF_HOME/gather_schema_changes.py -b R2-2023 -l info
- name: Add media type
run: echo -e 'text/plain\tdiff' | sudo tee -a /etc/mime.types
- name: Publish to S3
uses: sai-sharan/aws-s3-sync-action@v0.1.0
with:
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_access_key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
region: 'us-east-1'
source: 'schemadiff'
destination_bucket: 'foliodocs'
destination_prefix: 'schemadiff'
delete: false
quiet: true