Skip to content

Commit 1c776ba

Browse files
committed
Fix typo
1 parent 5b469ee commit 1c776ba

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/buildAndPublish.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ jobs:
4848
printf -v green '\033[0;32m'
4949
printf -v bold '\033[1m'
5050
printf -v reset '\033[0m'
51+
printf -v newLine '\n'
5152
52-
echo "::group::Check for changes in source code"
5353
echo "${yellow}${bold}------------------------------------------------------------------------------------------${reset}"
5454
echo "${yellow}${bold}Check for changes in source code${reset}"
5555
echo "${yellow}${bold}------------------------------------------------------------------------------------------${reset}"
56-
echo ""
56+
echo "${newLine}"
5757
echo "${yellow}Checking if there has been changes to source code by running git diff on the src folder excluding markdown files${reset}"
5858
5959
changes=$(git diff HEAD^ HEAD --ignore-all-space --name-only -- src/)
@@ -64,21 +64,21 @@ jobs:
6464
echo "${yellow}${bold}Changes:${reset}"
6565
echo "$changes"
6666
nonMarkdownChanges=$(echo $changes | grep -v '\.md$')
67-
else
68-
echo "${yellow}No changes to files in src folder. Cancelling the workflow${reset}"
69-
cancelWorkflow=true
70-
fi
7167
72-
if [ -n "$nonMarkdownChanges" ]; then
73-
echo ""
74-
echo "${green}${bold}There have been changes to non-Markdown files! Start building 🏗️${reset}"
68+
if [ -n "$nonMarkdownChanges" ]; then
69+
echo "${newLine}"
70+
echo "${green}${bold}There have been changes to non-Markdown files! Start building 🏗️${reset}"
71+
else
72+
echo "${newLine}"
73+
echo "${yellow}No changes to non-Markdown files detected. Cancelling the workflow${reset}"
74+
cancelWorkflow=true
75+
fi
7576
else
76-
echo ""
77-
echo "${yellow}${bold}No changes to non-Markdown files detected. Cancelling the workflow${reset}"
77+
echo "${yellow}No changes to files in src folder. Cancelling the workflow${reset}"
7878
cancelWorkflow=true
7979
fi
8080
81-
if [ "$cancelWorkflow" = true]; then
81+
if [ "$cancelWorkflow" = true ]; then
8282
# Use GitHub context variables directly
8383
REPO="${{ github.repository }}"
8484
RUN_ID="${{ github.run_id }}"
@@ -92,14 +92,13 @@ jobs:
9292
# Wait for cancellation to be processed
9393
sleep 5
9494
95-
echo ""
95+
echo "${newLine}"
9696
echo "Cancellation request sent. Note that cancellation might not be immediate."
9797
exit 0 # Explicitly exit with success to avoid running further steps if not needed
9898
fi
9999
100-
echo ""
100+
echo "${newLine}"
101101
echo "${yellow}${bold}------------------------------------------------------------------------------------------${reset}"
102-
echo "::endgroup::"
103102
104103
- name: Authenticate node
105104
uses: navikt/sf-platform/.github/actions/authenticateNode@main

0 commit comments

Comments
 (0)