-
Notifications
You must be signed in to change notification settings - Fork 13
67 lines (55 loc) · 1.71 KB
/
gather-schema-changes.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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