Skip to content

Commit 5b1d536

Browse files
committed
Fix warnings reported by actionlint
1 parent 3768435 commit 5b1d536

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/pr-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
IFS=',' read -ra LBL <<< "${LABELS_CSV}"
4141
for l in "${LBL[@]}"; do
4242
l="$(echo "$l" | xargs)"
43-
[[ $l == pr:* ]] && return 0
43+
[[ "$l" == pr:* ]] && return 0
4444
done
4545
return 1
4646
}
@@ -63,7 +63,7 @@ jobs:
6363
section_nonempty () {
6464
local hdr="$1"
6565
local section
66-
section="$(printf "%s" "$BODY" | awk -v h="^###[[:space:]]*$hdr[[:space:]]*$" '
66+
section="$(printf "%s" "$BODY" | awk -v h="^###[[:space:]]*${hdr}[[:space:]]*$" '
6767
BEGIN { insec=0 }
6868
$0 ~ h { insec=1; next }
6969
insec && $0 ~ /^##[[:space:]]/ { insec=0 }

.github/workflows/sdk-size-checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main
4343

4444
- name: Assemble release for metrics
45-
run: ./gradlew :metrics:$METRICS_PROJECT:assembleRelease
45+
run: ./gradlew :metrics:"$METRICS_PROJECT":assembleRelease
4646
env:
4747
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }}
4848
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }}
@@ -54,8 +54,8 @@ jobs:
5454
# Reads current SDK sizes from the metrics file
5555
# and define to a variable using a compact JSON format
5656
# so it can be exported for the next job step
57-
CURRENT_SDK_SIZES=$(jq -c .release $METRICS_FILE)
58-
echo "CURRENT_SDK_SIZES=$CURRENT_SDK_SIZES" >> $GITHUB_ENV
57+
CURRENT_SDK_SIZES=$(jq -c .release "$METRICS_FILE")
58+
echo "CURRENT_SDK_SIZES=$CURRENT_SDK_SIZES" >> "$GITHUB_ENV"
5959
6060
- name: Calculate PR branch SDK sizes
6161
run: |
@@ -74,7 +74,7 @@ jobs:
7474
jq -c --arg sdk "$module" --arg size "$size" '. + {($sdk): ($size | tonumber)}' pr_sdk_sizes.json > temp.json && mv temp.json pr_sdk_sizes.json
7575
done
7676
77-
echo "PR_SDK_SIZES=$(cat pr_sdk_sizes.json)" >> $GITHUB_ENV
77+
echo "PR_SDK_SIZES=$(cat pr_sdk_sizes.json)" >> "$GITHUB_ENV"
7878
7979
- name: Post a comment or print size comparison
8080
uses: actions/github-script@v7

.github/workflows/sdk-size-updates.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: GetStream/stream-build-conventions-android/.github/actions/setup-gradle@main
4545

4646
- name: Assemble release and debug for metrics
47-
run: ./gradlew :metrics:$METRICS_PROJECT:assemble
47+
run: ./gradlew :metrics:"$METRICS_PROJECT":assemble
4848
env:
4949
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }}
5050
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }}
@@ -82,12 +82,12 @@ jobs:
8282
jq . metrics.json
8383
8484
# Move temporary JSON file to the final file
85-
mv metrics.json $METRICS_FILE
85+
mv metrics.json "$METRICS_FILE"
8686
8787
- name: Update size badges
8888
run: |
8989
for module in $MODULES; do
90-
size=$(jq --arg module "$module" ".release.\"$module\"" $METRICS_FILE)
90+
size=$(jq --arg module "$module" ".release.\"$module\"" "$METRICS_FILE")
9191
sizeInMb=$(echo "scale=2; $size / 1024" | bc)
9292
badgeUrl="https://img.shields.io/badge/${module//-/--}-$sizeInMb%20MB-lightgreen"
9393
sed -i "s|!\[$module\](.*)|![$module](${badgeUrl})|" README.md
@@ -97,13 +97,13 @@ jobs:
9797
run: |
9898
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_PAT }}@github.com/${{ github.repository }}.git
9999
100-
git fetch origin $BRANCH_NAME
101-
git checkout $BRANCH_NAME
100+
git fetch origin "$BRANCH_NAME"
101+
git checkout "$BRANCH_NAME"
102102
103103
git config user.name "github-actions[bot]"
104104
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
105105
106-
git add $METRICS_FILE README.md
106+
git add "$METRICS_FILE" README.md
107107
git commit -m "[skip ci] Update SDK sizes" || echo "No changes to commit"
108108
109109
- name: Push changes

0 commit comments

Comments
 (0)