From 01e298489db99259bc5020d11884b924f724aeb8 Mon Sep 17 00:00:00 2001 From: Angad Date: Thu, 7 Sep 2023 17:42:33 -0700 Subject: [PATCH] chore: fix maintenance.yml, formatting --- .github/workflows/lint_pr_title.yaml | 2 +- .github/workflows/main_ci.yml | 8 +-- .github/workflows/maintenance.yml | 75 ++++++++++++++-------------- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/.github/workflows/lint_pr_title.yaml b/.github/workflows/lint_pr_title.yaml index 9ac4d6da..7a8870e2 100644 --- a/.github/workflows/lint_pr_title.yaml +++ b/.github/workflows/lint_pr_title.yaml @@ -18,4 +18,4 @@ jobs: steps: - uses: amannn/action-semantic-pull-request@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 32baddf3..19875842 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -2,7 +2,7 @@ name: Main CI on: pull_request: - branches: [ main, feature/* ] + branches: [main, feature/*] workflow_dispatch: env: @@ -32,10 +32,10 @@ jobs: - name: Setup cmake uses: jwlawson/actions-setup-cmake@v1.14 with: - cmake-version: '3.26' + cmake-version: "3.26" - name: Generate run: cmake -B "${{ github.workspace }}/build" -S "${{ github.workspace }}/CommonLibSF" --preset=build-release-${{ matrix.compiler }} - + - name: Build - run: cmake --build "${{ github.workspace }}/build" --config release \ No newline at end of file + run: cmake --build "${{ github.workspace }}/build" --config release diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index f3780938..d1769b62 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -1,10 +1,11 @@ name: "Maintainance" -on: - workflow_run: - workflows: ["Main CI"] - types: - - completed +on: + push: + branches: [main] + paths: + - ".github/workflows/main_ci.yml" + - "CommonLibSF/**" jobs: maintainance: @@ -12,35 +13,35 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Update Starfield.h - shell: pwsh - run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF" - - - name: Enforce style formatting - uses: DoozyX/clang-format-lint-action@v0.16.2 - with: - source: '.' - exclude: './docs' - extensions: 'c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx' - clangFormatVersion: 16 - inplace: True - - - 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 }} + - name: Checkout + uses: actions/checkout@v2 + + - name: Update Starfield.h + shell: pwsh + run: "& ${{ github.workspace }}/.github/make-directives.ps1 ${{ github.workspace }}/CommonLibSF" + + - name: Enforce style formatting + uses: DoozyX/clang-format-lint-action@v0.16.2 + with: + source: "." + exclude: "./docs" + extensions: "c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx" + clangFormatVersion: 16 + inplace: True + + - 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 }}