chore: add Prettier action, bump actions/checkout version (#16) #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Maintainance" | |
on: | |
push: | |
branches: [main] | |
paths: | |
- ".github/workflows/*.yml" | |
- "CommonLibSF/**" | |
jobs: | |
maintainance: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Starfield.h | |
shell: pwsh | |
run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF" | |
- name: Enforce style formatting | |
uses: DoozyX/[email protected] | |
with: | |
source: "." | |
exclude: "./docs" | |
extensions: "c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx" | |
clangFormatVersion: 16 | |
inplace: True | |
- name: Prettier | |
uses: actionsx/prettier@v3 | |
with: | |
args: --write "{.github/workflows/*.yml}" "{CommonLibSF/*.json}" | |
- name: Update vcpkg version-date | |
id: versioning | |
shell: pwsh | |
run: "& ${{ github.workspace }}/.github/update-registry.ps1 ${{ github.workspace }}" | |
- name: Check for success | |
run: exit 1 | |
if: ${{ steps.versioning.outputs.VCPKG_SUCCESS == 'false' }} | |
- name: Check for commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: maintenance | |
message: "ci: maintenance `${{ steps.versioning.outputs.VCPKG_VERSION }}`" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |