Skip to content

Commit c10dd00

Browse files
replace '' to ""
1 parent 21f8351 commit c10dd00

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
if [ -n "${{ github.event.inputs.build_number }}" ]; then
4242
BUILD_NUMBER=${{ github.event.inputs.build_number }}
4343
echo "using provided build number: $BUILD_NUMBER"
44-
curl -X POST -H 'Content-type: application/json' --data '{"text":":package: Using provided build number: $BUILD_NUMBER"}' ${{ env.SLACK_WEBHOOK_URL }}
44+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":package: Using provided build number: $BUILD_NUMBER\"}" ${{ env.SLACK_WEBHOOK_URL }}
4545
else
4646
BUILD_NUMBER=$(date +'%d%m%Y%H%M%S')
4747
echo "using generated build number: $BUILD_NUMBER"
48-
curl -X POST -H 'Content-type: application/json' --data '{"text":":gear: Generated new build number: $BUILD_NUMBER"}' ${{ env.SLACK_WEBHOOK_URL }}
48+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":gear: Generated new build number: $BUILD_NUMBER\"}" ${{ env.SLACK_WEBHOOK_URL }}
4949
fi
5050
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
5151
- name: Login to Docker Hub
@@ -60,18 +60,18 @@ jobs:
6060
echo "checking if $IMAGE exists"
6161
if ! docker manifest inspect "$IMAGE" > /dev/null 2>&1; then
6262
echo "provided image $IMAGE does not exist. exiting..."
63-
curl -X POST -H 'Content-type: application/json' --data '{"text":":x: :warning: Provided image $IMAGE does not exist! Exiting deployment..."}' ${{ env.SLACK_WEBHOOK_URL }}
63+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":x: :warning: Provided image $IMAGE does not exist! Exiting deployment...\"}" ${{ env.SLACK_WEBHOOK_URL }}
6464
exit 1
6565
fi
6666
echo "provided image $IMAGE exists ✅"
67-
curl -X POST -H 'Content-type: application/json' --data '{"text":":white_check_mark: Image $IMAGE exists and ready for deployment"}' ${{ env.SLACK_WEBHOOK_URL }}
67+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":white_check_mark: Image $IMAGE exists and ready for deployment\"}" ${{ env.SLACK_WEBHOOK_URL }}
6868
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
6969
- name: Maven Clean Verify
7070
if: ${{ github.event.inputs.build_number == '' }}
7171
run: |
72-
curl -X POST -H 'Content-type: application/json' --data '{"text":":hammer_and_wrench: Building and deploying $IMAGE to Docker Hub..."}' ${{ env.SLACK_WEBHOOK_URL }}
72+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":hammer_and_wrench: Building and deploying $IMAGE to Docker Hub...\"}" ${{ env.SLACK_WEBHOOK_URL }}
7373
mvn -B -ntp clean verify jib:build -Ddocker.image.tag=$BUILD_NUMBER
74-
curl -X POST -H 'Content-type: application/json' --data '{"text":":white_check_mark: Successfully built and pushed $IMAGE to Docker Hub"}' ${{ env.SLACK_WEBHOOK_URL }}
74+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":white_check_mark: Successfully built and pushed $IMAGE to Docker Hub\"}" ${{ env.SLACK_WEBHOOK_URL }}
7575
- name: Setup SSH Agent
7676
uses: webfactory/[email protected]
7777
with:
@@ -88,7 +88,7 @@ jobs:
8888
docker ps
8989
echo "$BUILD_NUMBER" > build-number.txt
9090
EOF
91-
curl -X POST -H 'Content-type: application/json' --data '{"text":":tada: Successfully deployed $IMAGE to AWS EC2"}' ${{ env.SLACK_WEBHOOK_URL }}
91+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":tada: Successfully deployed $IMAGE to AWS EC2\"}" ${{ env.SLACK_WEBHOOK_URL }}
9292
- name: Send slack message with status
9393
if: always()
9494
run: |

0 commit comments

Comments
 (0)