Skip to content

Docs Fix (Triggered on Check Failure) #3

Docs Fix (Triggered on Check Failure)

Docs Fix (Triggered on Check Failure) #3

Workflow file for this run

# 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