Skip to content

Pr fix format check UI fail #87

Pr fix format check UI fail

Pr fix format check UI fail #87

Workflow file for this run

name: 'Format Check'

Check failure on line 1 in .github/workflows/format_check.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/format_check.yml

Invalid workflow file

(Line: 54, Col: 9): Unexpected value 'outputs'
on:
push:
branches:
- 'main'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'main'
workflow_dispatch:
jobs:
verify-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false
- name: Get first commit SHA
id: first-commit
if: github.event_name == 'workflow_dispatch'
run: echo "sha=$(git rev-list --max-parents=0 HEAD)" >> $GITHUB_OUTPUT
- name: Get changed source files that need format check
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
cores/arduino/**/*.{c,cpp,h,hpp,ino}
loader/**/*.{c,cpp,h,hpp,ino}
libraries/**/*.{c,cpp,h,hpp,ino}
files_ignore: |
cores/arduino/api/**
loader/llext_exports.c
libraries/examples/**
libraries/extras/**
libraries/ea_malloc/**
write_output_files: true
- name: List changed files
id: changed-files-list
if: steps.changed-files.outputs.any_changed == 'true' and github.event_name != 'workflow_dispatch'
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
run: cat .github/outputs/all_changed_files.txt
- name: Run clang-format check
if: steps.changed-files.outputs.any_changed == 'true' or github.event_name == 'workflow_dispatch'
uses: pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6
with:
clang-format-version: '19'
check-files-from: ${{ steps.changed-files-list.outputs.all_changed_files }}
check-path: ${{ github.event_name == 'workflow_dispatch' && '.' }}