Skip to content

Commit c778010

Browse files
authored
feat: add yamllint (#4)
1 parent b61a529 commit c778010

File tree

3 files changed

+36
-10
lines changed

3 files changed

+36
-10
lines changed

.github/actions/publish_docc/action.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1+
---
12
name: Build and Publish Documentation
23

34
inputs:
4-
# The target's name which documentation is built for.
55
target:
66
required: true
77
type: string
8-
# The output path for the documentation.
98
output_path:
109
required: true
1110
type: string
12-
# The hosting base path for the documentation.
1311
hosting_base_path:
1412
required: true
1513
type: string
16-
# The branch name to which documentation will be uploaded.
1714
branch_name:
1815
required: true
1916
type: string
@@ -46,9 +43,12 @@ runs:
4643
shell: bash
4744
run: |
4845
git fetch
49-
git worktree add --checkout ${{ inputs.branch_name }} origin/${{ inputs.branch_name }}
46+
git worktree add --checkout ${{ inputs.branch_name }} \
47+
origin/${{ inputs.branch_name }}
48+
49+
git config --local user.email \
50+
"github-actions[bot]@users.noreply.github.com"
5051
51-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
5252
git config --local user.name "github-actions[bot]"
5353
git switch ${{ inputs.branch_name }}
5454
@@ -59,12 +59,14 @@ runs:
5959
git add ./${{ inputs.output_path }}
6060
6161
if [ -n "$(git status --porcelain)" ]; then
62-
echo "Documentation changes found. Commiting the changes to the '${{ inputs.branch_name }}' branch and pushing to origin."
62+
echo "Documentation changes found. \
63+
Commiting the changes to the '${{ inputs.branch_name }}' \
64+
branch and pushing to origin."
6365
git commit -a -m "Generated ${{ inputs.target }} Swift DocC"
6466
git push origin ${{ inputs.branch_name }}
6567
else
6668
# No changes found, nothing to commit.
6769
echo "No documentation changes found."
6870
fi
6971
70-
git worktree remove ${{ inputs.branch_name }}
72+
git worktree remove ${{ inputs.branch_name }}

.github/actions/upload_test_coverage_report/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Upload Test Coverage Report
23

34
inputs:
@@ -30,9 +31,12 @@ runs:
3031

3132
- name: Convert the test report
3233
run: |
33-
xcresultparser -o cobertura "test_output/${{ inputs.filename }}.xcresult" > cobertura.xml
34+
xcresultparser \
35+
-o cobertura \
36+
"test_output/${{ inputs.filename }}.xcresult" \
37+
> cobertura.xml
3438
shell: bash
35-
39+
3640
- name: Upload coverage reports to Codecov
3741
uses: codecov/codecov-action@v5.1.2
3842
with:

.github/workflows/yamllint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Yamllint GitHub Actions'
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
yamllint:
8+
name: 'Yamllint'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout'
12+
uses: actions/checkout@master
13+
- name: 'Yamllint'
14+
uses: karancode/yamllint-github-action@master
15+
with:
16+
yamllint_file_or_dir: '.github/actions'
17+
yamllint_strict: true
18+
yamllint_comment: true
19+
env:
20+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)