Skip to content

Commit eb50444

Browse files
committed
Add blank lines to visually group shell command lines
The `run` keys of the steps in the GitHub Actions workflows contain complex shell command lines. The readability of this code is improved by selectively adding blank lines to separate it visually into logical groupings.
1 parent 9567dbd commit eb50444

13 files changed

+64
-0
lines changed

.github/workflows/check-clang-format.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
echo "YQ_INSTALL_PATH=${{ runner.temp }}/yq" >> "$GITHUB_ENV"
8787
echo "WORKING_FOLDER=${{ runner.temp }}" >> "$GITHUB_ENV"
8888
89+
8990
- name: Download ClangFormat
9091
id: download-clang-format
9192
uses: MrOctopus/download-asset-action@1.0
@@ -98,9 +99,11 @@ jobs:
9899
- name: Install ClangFormat
99100
run: |
100101
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}"
102+
101103
tar \
102104
--extract \
103105
--file="${{ steps.download-clang-format.outputs.name }}"
106+
104107
# Add installation to PATH:
105108
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
106109
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"
@@ -116,9 +119,11 @@ jobs:
116119
- name: Install yq
117120
run: |
118121
cd "${{ env.YQ_INSTALL_PATH }}"
122+
119123
tar \
120124
--extract \
121125
--file="${{ steps.download-yq.outputs.name }}"
126+
122127
# Add installation to PATH:
123128
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
124129
echo "${{ env.YQ_INSTALL_PATH }}/yq" >> "$GITHUB_PATH"
@@ -166,6 +171,7 @@ jobs:
166171
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >> "$GITHUB_ENV"
167172
echo "WORKING_FOLDER=${{ runner.temp }}" >> "$GITHUB_ENV"
168173
174+
169175
- name: Download ClangFormat
170176
id: download
171177
uses: MrOctopus/download-asset-action@1.0
@@ -178,9 +184,11 @@ jobs:
178184
- name: Install ClangFormat
179185
run: |
180186
cd "${{ env.CLANG_FORMAT_INSTALL_PATH }}"
187+
181188
tar \
182189
--extract \
183190
--file="${{ steps.download.outputs.name }}"
191+
184192
# Add installation to PATH:
185193
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
186194
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"

.github/workflows/check-general-formatting-task.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
mv \
8181
"${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" \
8282
"${{ env.EC_INSTALL_PATH }}/bin/ec"
83+
8384
# Add installation to PATH:
8485
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
8586
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"

.github/workflows/check-shell-task.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,17 @@ jobs:
105105
- name: Install ShellCheck
106106
run: |
107107
cd "${{ env.INSTALL_PATH }}"
108+
108109
tar \
109110
--extract \
110111
--file="${{ steps.download.outputs.name }}"
112+
111113
EXTRACTION_FOLDER="$(
112114
basename \
113115
"${{ steps.download.outputs.name }}" \
114116
"${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}"
115117
)"
118+
116119
# Add installation to PATH:
117120
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
118121
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >> "$GITHUB_PATH"
@@ -169,10 +172,12 @@ jobs:
169172
chmod \
170173
+x \
171174
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"
175+
172176
# Standardize binary name
173177
mv \
174178
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" \
175179
"${{ env.SHFMT_INSTALL_PATH }}/shfmt"
180+
176181
# Add installation to PATH:
177182
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
178183
echo "${{ env.SHFMT_INSTALL_PATH }}" >> "$GITHUB_PATH"

.github/workflows/test-install-script.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
--in-place \
4848
's/PROJECT_OWNER="${{ env.PROJECT_OWNER_PLACEHOLDER }}"/PROJECT_OWNER="${{ env.PROJECT_OWNER }}"/' \
4949
"${{ env.SCRIPT_FOLDER }}/${{ env.SCRIPT_NAME }}"
50+
5051
sed \
5152
--in-place \
5253
's/PROJECT_NAME="${{ env.PROJECT_NAME_PLACEHOLDER }}"/PROJECT_NAME="${{ env.PROJECT_NAME }}"/' \
@@ -136,6 +137,7 @@ jobs:
136137
mkdir \
137138
-p \
138139
"${{ env.BINDIR }}"
140+
139141
"${{ github.workspace }}/${{ env.SCRIPT_NAME }}"
140142
141143
- name: Verify installation
@@ -277,6 +279,7 @@ jobs:
277279
mkdir \
278280
-p \
279281
"${{ env.BINDIR }}"
282+
280283
"${{ github.workspace }}/${{ env.SCRIPT_NAME }}" \
281284
| \
282285
grep \
@@ -298,6 +301,7 @@ jobs:
298301
mkdir \
299302
-p \
300303
"${{ env.BINDIR }}"
304+
301305
"${{ github.workspace }}/${{ env.SCRIPT_NAME }}" \
302306
| \
303307
grep \
@@ -316,6 +320,7 @@ jobs:
316320
mkdir \
317321
-p \
318322
"${{ env.BINDIR }}"
323+
319324
"${{ github.workspace }}/${{ env.SCRIPT_NAME }}" \
320325
| \
321326
grep \

workflow-templates/check-general-formatting-task.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ jobs:
7171
- name: Install editorconfig-checker
7272
run: |
7373
cd "${{ env.EC_INSTALL_PATH }}"
74+
7475
tar \
7576
--extract \
7677
--file="${{ steps.download.outputs.name }}"
78+
7779
# Give the binary a standard name
7880
mv \
7981
"${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" \
8082
"${{ env.EC_INSTALL_PATH }}/bin/ec"
83+
8184
# Add installation to PATH:
8285
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
8386
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"

workflow-templates/check-shell-task.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,17 @@ jobs:
106106
- name: Install ShellCheck
107107
run: |
108108
cd "${{ env.INSTALL_PATH }}"
109+
109110
tar \
110111
--extract \
111112
--file="${{ steps.download.outputs.name }}"
113+
112114
EXTRACTION_FOLDER="$(
113115
basename \
114116
"${{ steps.download.outputs.name }}" \
115117
"${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}"
116118
)"
119+
117120
# Add installation to PATH:
118121
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
119122
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >> "$GITHUB_PATH"
@@ -171,10 +174,12 @@ jobs:
171174
chmod \
172175
+x \
173176
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"
177+
174178
# Standardize binary name
175179
mv \
176180
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" \
177181
"${{ env.SHFMT_INSTALL_PATH }}/shfmt"
182+
178183
# Add installation to PATH:
179184
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
180185
echo "${{ env.SHFMT_INSTALL_PATH }}" >> "$GITHUB_PATH"

workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,18 @@ jobs:
9393
git config \
9494
--global \
9595
user.email "bot@arduino.cc"
96+
9697
git config \
9798
--global \
9899
user.name "ArduinoBot"
100+
99101
git fetch \
100102
--no-tags \
101103
--prune \
102104
--depth=1 \
103105
origin \
104106
+refs/heads/gh-pages:refs/remotes/origin/gh-pages
107+
105108
poetry run \
106109
mike deploy \
107110
--update-aliases \

workflow-templates/deploy-mkdocs-versioned-poetry.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,18 @@ jobs:
8181
git config \
8282
--global \
8383
user.email "bot@arduino.cc"
84+
8485
git config \
8586
--global \
8687
user.name "ArduinoBot"
88+
8789
git fetch \
8890
--no-tags \
8991
--prune \
9092
--depth=1 \
9193
origin \
9294
+refs/heads/gh-pages:refs/remotes/origin/gh-pages
95+
9396
poetry run \
9497
mike deploy \
9598
--update-aliases \

workflow-templates/publish-go-nightly-task.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,26 @@ jobs:
112112
KEYCHAIN_PASSWORD: keychainpassword
113113
run: |
114114
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode >"${{ env.INSTALLER_CERT_MAC_PATH }}"
115+
115116
security create-keychain \
116117
-p "${{ env.KEYCHAIN_PASSWORD }}" \
117118
"${{ env.KEYCHAIN }}"
119+
118120
security default-keychain \
119121
-s "${{ env.KEYCHAIN }}"
122+
120123
security unlock-keychain \
121124
-p "${{ env.KEYCHAIN_PASSWORD }}" \
122125
"${{ env.KEYCHAIN }}"
126+
123127
security import \
124128
"${{ env.INSTALLER_CERT_MAC_PATH }}" \
125129
-k "${{ env.KEYCHAIN }}" \
126130
-f pkcs12 \
127131
-A \
128132
-T /usr/bin/codesign \
129133
-P "${{ secrets.INSTALLER_CERT_MAC_PASSWORD }}"
134+
130135
security set-key-partition-list \
131136
-S apple-tool:,apple: \
132137
-s \
@@ -142,6 +147,7 @@ jobs:
142147
unzip \
143148
gon_macos.zip \
144149
-d /usr/local/bin
150+
145151
- name: Write gon config to file
146152
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
147153
run: |
@@ -179,6 +185,7 @@ jobs:
179185
chmod \
180186
+x \
181187
"${{ env.BUILD_FOLDER }}/${{ env.PROJECT_NAME }}"
188+
182189
# Use of an array here is required for globbing
183190
PACKAGE_FILENAME=(${{ env.PROJECT_NAME }}_nightly-*${{ matrix.build.package-suffix }})
184191
@@ -188,7 +195,9 @@ jobs:
188195
"${{ env.PROJECT_NAME }}" \
189196
-C ../../ \
190197
LICENSE.txt
198+
191199
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >>$GITHUB_ENV
200+
192201
- name: Replace artifact with notarized build
193202
uses: actions/upload-artifact@v4
194203
with:

workflow-templates/publish-go-tester-task.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ jobs:
151151
- name: Create checksum file
152152
run: |
153153
TAG="${{ needs.package-name-prefix.outputs.prefix }}git-snapshot"
154+
154155
declare \
155156
-a \
156157
artifacts=($(ls -d */))
158+
157159
for artifact in ${artifacts[@]}
158160
do
159161
cd $artifact

0 commit comments

Comments
 (0)