mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
When using these workflows on PR, the following error message is displayed Error: When the repository is checked out on a commit instead of a branch, the 'base' input must be supplied.
29 lines
880 B
YAML
29 lines
880 B
YAML
name: cmake-format
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
cmake-format-job:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install cmakelang for cmake-format
|
|
run: |
|
|
python3 -m pip install --user cmakelang
|
|
- uses: actions/checkout@v2
|
|
- name: Check format - ApplicationCode
|
|
run: |
|
|
cd ApplicationCode
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
git diff
|
|
- name: Check format - AppFwk
|
|
run: |
|
|
cd Fwk/AppFwk
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
git diff
|
|
- uses: peter-evans/create-pull-request@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: 'Fixes by cmake-format'
|
|
title: 'Fixes by cmake-format'
|
|
branch: cmake-format-patches
|