Skip to content

Commit a4c936b

Browse files
committed
Update follow DS template format
1 parent 6f0a8ac commit a4c936b

File tree

3 files changed

+46
-44
lines changed

3 files changed

+46
-44
lines changed

.github/workflows/00-Check-Code-Convention.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
name: 00-Check-Code-Convention
22
on:
3-
#Only manual trigger for now
4-
# TODO analyse what to enable
5-
# push:
6-
# branches-ignore:
7-
# - main
8-
# - "tests/**"
9-
# pull_request:
10-
# branches:
11-
# - main
12-
# - develop
13-
# - "release/**"
3+
push:
4+
branches-ignore:
5+
- main
6+
- "tests/**"
7+
pull_request:
8+
branches:
9+
- main
10+
- "release/**"
1411
workflow_dispatch:
1512
inputs:
1613
branch:
1714
description: 'Branch to test'
1815
type: string
19-
default: 'dev'
16+
default: 'main'
2017

2118
jobs:
2219
job1:
@@ -39,9 +36,6 @@ jobs:
3936
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}"
4037
submodules: true
4138
fetch-depth: 0
42-
## an internal repo as a submodule is present therefore PAT is needed
43-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
44-
4539
- name: Log Current Branch and Commit
4640
run: |
4741
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
@@ -63,21 +57,28 @@ jobs:
6357
sudo make install
6458
echo "Uncrustify has been installed successfully!"
6559
cd ../../
66-
sudo cp ./.github/coding-convention-tool/tools/uncrustify.cfg ./uncrustify/uncrustify.cfg
67-
echo "Install clang-tidy and cppcheck ..."
68-
sudo apt-get install clang-tidy cppcheck
60+
sudo cp ./.github/coding-convention-tool/tools/uncrustify/uncrustify.cfg ./uncrustify/uncrustify.cfg
61+
echo "Install clang-tidy"
62+
sudo apt-get install clang-tidy
6963
- name: Run test
7064
run: |
71-
pre-commit install
72-
pre-commit run --all-files 2>&1 | tee CodingConventionTool.txt
65+
pre-commit install --config .github/coding-convention-tool/.pre-commit-config.yaml
66+
pre-commit run --config .github/coding-convention-tool/.pre-commit-config.yaml --all-files 2>&1 | tee CodingConventionTool.txt
67+
git diff > code-fix.patch || echo "No changes to patch."
68+
ls -lah code-fix.patch
7369
7470
- name: Upload Result
75-
if: always()
7671
uses: actions/[email protected]
7772
with:
7873
name: CodingConventionResult
7974
path: CodingConventionTool.txt
8075
retention-days: 90
76+
- name: Upload Patch
77+
uses: actions/[email protected]
78+
with:
79+
name: code-fix.patch
80+
path: code-fix.patch
81+
retention-days: 90
8182
- name: Check log file to set status of the job
8283
run: |
8384
keywords=("Failed")
@@ -88,4 +89,4 @@ jobs:
8889
else
8990
echo "Keyword '$keyword' not found in the file."
9091
fi
91-
done
92+
done

.github/workflows/01-CLA-Assistant.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ name: 01-CLA-Assistant
33
## uncomment the other trigger conditions for public repositories
44

55
on:
6-
workflow_dispatch:
7-
# issue_comment:
8-
# types: [created]
9-
# pull_request_target:
10-
# types: [opened,closed,synchronize,reopened]
6+
issue_comment:
7+
types: [created]
8+
pull_request_target:
9+
types: [opened,closed,synchronize,reopened]
1110

12-
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
1311
permissions:
1412
actions: write
1513
contents: read # this can be 'read' if the signatures are in remote repository
@@ -20,22 +18,28 @@ jobs:
2018
CLAAssistant:
2119
runs-on: ubuntu-24.04
2220
steps:
21+
- name: Create CLA Assistant Lite bot token
22+
uses: actions/create-github-app-token@v2
23+
id: app-token
24+
with:
25+
app-id: ${{ secrets.GH_APP_ID }}
26+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
27+
owner: SiliconLabsInternal
28+
repositories: contributor-license-agreements
29+
2330
- name: "CLA Assistant"
2431
if: ${{ contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA') }} || github.event_name == 'pull_request_target'
25-
uses: SiliconLabsWorkflows/cla-assistant@silabs_flavour_v2
32+
uses: SiliconLabsSoftware/action-cla-assistant@silabs_flavour_v2
2633
env:
2734
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
# the below token should have repo scope and must be manually added by you in the repository's secret
29-
# This token is required only if you have configured to store the signatures in a remote repository/organization
30-
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
35+
PERSONAL_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
3136
with:
3237
path-to-signatures: "cla_signatures_db.json"
33-
path-to-document: "https://github.com/SiliconLabsSoftware/bluetooth-AoA-example/blob/main/cla.md"
34-
# branch should not be protected
38+
path-to-document: "https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md"
3539
branch: 'cla-database'
3640
allowlist: silabs-*,bot*
3741
# the following are the optional inputs - If the optional inputs are not given, then default values will be taken
3842
remote-organization-name: "SiliconLabsInternal"
3943
remote-repository-name: "contributor-license-agreements"
4044
create-file-commit-message: "Created the CLA database file. CLA Assistant Lite bot created this file."
41-
signed-commit-message: "$contributorName has signed the CLA in $owner/$repo#$pullRequestNo"
45+
signed-commit-message: "$contributorName has signed the CLA in $owner/$repo#$pullRequestNo"
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
name: 04-TruffleHog-Security-Scan
22
on:
3-
#Only manual trigger for now
4-
# TODO analyse what to enable
5-
#pull_request:
6-
# branches:
7-
# - main
8-
# - develop
9-
workflow_dispatch:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
107
jobs:
118
trufflehog_scan:
12-
runs-on: ubuntu-24.04
9+
runs-on: ubuntu-latest
1310
steps:
1411
- name: Checkout code
1512
uses: actions/checkout@v4
@@ -18,4 +15,4 @@ jobs:
1815
- name: Secret Scanning
1916
uses: trufflesecurity/[email protected]
2017
with:
21-
extra_args: --only-verified
18+
extra_args: --only-verified

0 commit comments

Comments
 (0)