-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (49 loc) · 1.59 KB
/
Copy pathdocs-fix.yml
File metadata and controls
60 lines (49 loc) · 1.59 KB
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
# Copyright 2022 The Magma Authors.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# owner: @magma/approvers-infra
# purpose: Fixes the documentation if any issue is found during tests
# remediation:
name: Docs Fix (Triggered on Check Failure)
on:
workflow_run:
workflows: ["Docs Check"]
types:
- completed
jobs:
only_if_failed:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup Python (if needed)
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install deps
run: yarn install --frozen-lockfile
- name: Run precommit fix
run: make -C readmes precommit_fix
- name: Show diff after fix
run: git diff --color
- name: Upload patch
run: |
git diff > docs_fixes.patch
continue-on-error: true
- name: Upload auto-fix patch
uses: actions/upload-artifact@v4
with:
name: auto-fix-patch
path: docs_fixes.patch