-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.93 KB
/
auto_update_doc.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
name: Auto update documentation/backend test data
on:
pull_request_target:
workflow_dispatch:
permissions: # set top-level default permissions as security best practice
contents: read # Check https://github.com/ossf/scorecard/blob/7ce8609469289d5f3b1bf5ee3122f42b4e3054fb/docs/checks.md#token-permissions
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
jobs:
auto-update-doc:
if: contains( github.event.pull_request.labels.*.name, 'auto update doc')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
# Checkout the branch made in the fork. Will automatically push changes
# back to this branch.
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.11"
- name: Install ONNX from source and update documentation
run: |
python -m pip install -q --upgrade pip
python -m pip install -r requirements-release.txt
git submodule update --init --recursive
export ONNX_ML=1
pip install -e .
python onnx/defs/gen_doc.py
python onnx/gen_proto.py -l
python onnx/gen_proto.py -l --ml
python onnx/backend/test/stat_coverage.py
python onnx/backend/test/cmd_tools.py generate-data --diff
git diff -- . ':(exclude)onnx/onnx-data.proto' ':(exclude)onnx/onnx-data.proto3'
- name: Commit changes with updated files
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: CI:apply auto updated documentation/backend test data
commit_options: "--signoff"