Skip to content

Commit

Permalink
Use the re-usable misspell action
Browse files Browse the repository at this point in the history
And fix one typo while at it.
  • Loading branch information
JanneKiiskila committed Jul 11, 2024
1 parent 22a58c6 commit d50fee9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Misspell
on:
push:
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: misspell-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
misspell:
runs-on: ["self-hosted", "client"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Misspell
uses: PelionIoT/actions/.github/actions/misspell@main
with:
exceptions: "mosquitto"
9 changes: 0 additions & 9 deletions .github/workflows/pr-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,6 @@ jobs:
- uses: actions/checkout@v4
- run: ./check_versions.sh

misspell:
runs-on: [ "self-hosted", "client" ]
steps:
- name: Run misspell (findings may not increase)
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
bin/misspell -i mosquitto
run-edge-info:
runs-on: ubuntu-22.04
steps:
Expand Down
4 changes: 2 additions & 2 deletions fw-tools/edge-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ verbose() {
}

# Extract the server name from the URL - bootstrap/lwm2m/edge-k8s/gateways/containers
# If the URL starts with "edge-k8s", the server name will be from the begining until the second hyphen or the first dot.
# If the URL starts with "edge-k8s", the server name will be from the beginning until the second hyphen or the first dot.
# If the URL starts with "tcp-"/"udp-", the server name will come after "tcp-"/"udp-" until the first dot or hyphen
# In other cases the server name will be from the beginning until the first dot or hyphen
#
Expand All @@ -90,7 +90,7 @@ extract_server_name() {

if [[ $URL =~ ^(edge-k8s) ]]; then
# If the URL starts with edge-k8s,
# Extract the substring from the begining until the second hyphen
# Extract the substring from the beginning until the second hyphen
# Or from the beginning until the first dot.
# In practice it will be "edge-k8s".
RESULT=$(echo "$URL" | grep -o '^[^-]*-[^-]*' | grep -o '^[^.]*')
Expand Down

0 comments on commit d50fee9

Please sign in to comment.