Skip to content

Commit 321f391

Browse files
committed
Add GH Actions linter, fix reported issues
1 parent 3b57e62 commit 321f391

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Get version slug
4343
id: slug
4444
run: |
45-
echo "slug=$(git describe --tags --match 'v?.??' --always --dirty || echo v0.00)" >> $GITHUB_OUTPUT
45+
echo "slug=$(git describe --tags --match 'v?.??' --always --dirty || echo v0.00)" >> "$GITHUB_OUTPUT"
4646
4747
- name: Compile firmware
4848
uses: arduino/compile-sketches@v1
@@ -94,16 +94,15 @@ jobs:
9494
name: ${{ github.event.repository.name }}-${{ needs.build.outputs.slug }}
9595
path: artifact
9696
- name: Archive the build artifact
97-
run: cd "artifact" && zip -9 -r "../${FILENAME}" *
97+
run: cd "artifact" && zip -9 -r "../${FILENAME}" ./*
9898
env:
9999
FILENAME: ${{ github.event.repository.name }}-${{ needs.build.outputs.slug }}.zip
100100
- name: Create release
101101
env:
102102
GITHUB_TOKEN: ${{ github.token }}
103103
SLUG: ${{ needs.build.outputs.slug }}
104104
run: >-
105-
cat artifact/ats-mini/CHANGELOG.md |
106-
python -c 'import os,re,sys; t=sys.stdin.read(); r=re.search(f"""(^## {os.environ["SLUG"][1:].replace(".", "\\.")} .*?)(?=^## \\d|\\Z)""", t, re.MULTILINE | re.DOTALL); print(r.group(0) if r else "")' |
105+
python -c 'import os,re; t=open("artifact/ats-mini/CHANGELOG.md").read(); r=re.search(f"""(^## {os.environ["SLUG"][1:].replace(".", "\\.")} .*?)(?=^## \\d|\\Z)""", t, re.MULTILINE | re.DOTALL); print(r.group(0) if r else "")' |
107106
gh release create "$SLUG" --repo '${{ github.repository }}' --notes-file -
108107
- name: Upload release artifact
109108
env:

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
5353
environment:
5454
name: github-pages
55-
url: ${{ steps.artifact.outputs.page_url }}
55+
url: ${{ steps.deployment.outputs.page_url }}
5656
runs-on: ubuntu-latest
5757
needs: build
5858
permissions:

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v5.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
8-
- repo: https://github.com/pre-commit/mirrors-clang-format
8+
- repo: https://github.com/pre-commit/mirrors-clang-format
99
rev: v20.1.0
1010
hooks:
1111
- id: clang-format
@@ -14,3 +14,7 @@ repos:
1414
args:
1515
- "--style={BasedOnStyle: llvm, ColumnLimit: 0}"
1616
exclude: ats-mini/patch_init.h
17+
- repo: https://github.com/rhysd/actionlint
18+
rev: v1.7.7
19+
hooks:
20+
- id: actionlint

0 commit comments

Comments
 (0)