Repository navigation
67 lines (57 loc) · 1.9 KB
/
Copy pathcmake_format.yml
File metadata and controls
67 lines (57 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Lint Cron
on:
schedule:
- cron: "0 7 * * SUN"
workflow_dispatch:
concurrency:
group: cmake-format-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CMAKE_VERSION: 3.16.9
TZ: Europe/Berlin
defaults:
run:
shell: bash -exo pipefail {0}
jobs:
build:
name: cmake-format
runs-on: ubuntu-22.04
timeout-minutes: 300
if: github.repository_owner == 'seqan'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: false
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies
run: pip install cmakelang[YAML]
- name: Run cmake-format
run: |
find . \( -iname CMakeLists.txt -or -iname "*.cmake" \) \
-and -not -path "./submodules/*" \
-and -not -path "./build/*" | \
xargs cmake-format --config-files .cmake-format.yaml --in-place
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.SEQAN_ACTIONS_GPG_KEY }}
passphrase: ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.SEQAN_ACTIONS_PAT }}
push-to-fork: seqan-actions/${{github.repository}}
commit-message: '[CRON] cmake-format'
committer: seqan-actions[bot] <seqan-actions@users.noreply.github.com>
author: seqan-actions[bot] <seqan-actions@users.noreply.github.com>
branch: actions/cmake-format/${{github.repository}}
delete-branch: true
title: '[CRON] cmake-format'
body: Auto-generated cmake-format changes