Bladeren bron

Enclose env vars with double quotes (#217)

mdmathias 3 jaren geleden
bovenliggende
commit
62b7223347
2 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen
  1. 6 5
      .github/workflows/pr_notification.yml
  2. 1 1
      .github/workflows/push_notification.yml

+ 6 - 5
.github/workflows/pr_notification.yml

@@ -7,9 +7,6 @@ on:
 jobs:
   notify-pull-request:
     runs-on: ubuntu-latest
-    env:
-      TITLE: ${{ github.event.pull_request.title }}
-      LABELS: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
     steps:
     - name: Pull Request Details
       run: |
@@ -17,6 +14,10 @@ jobs:
         echo "Author: ${{ github.event.pull_request.user.login }}"
 
     - name: Google Chat Notification
+      shell: bash
+      env:
+        TITLE: ${{ github.event.pull_request.title }}
+        LABELS: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
       run: |
         curl --location --request POST '${{ secrets.WEBHOOK_URL }}' \
         --header 'Content-Type: application/json' \
@@ -39,7 +40,7 @@ jobs:
                     {
                       "keyValue": {
                         "topLabel": "Title",
-                        "content": "$TITLE"
+                        "content": "'"$TITLE"'"
                       }
                     },
                     {
@@ -69,7 +70,7 @@ jobs:
                     {
                       "keyValue": {
                         "topLabel": "Labels",
-                        "content": "- $LABELS"
+                        "content": "- '"$LABELS"'"
                       }
                     },
                     {

+ 1 - 1
.github/workflows/push_notification.yml

@@ -26,7 +26,7 @@ jobs:
             {
               "header": {
                 "title": "Push to main branch",
-                "subtitle": "$COMMIT"
+                "subtitle": "'"$COMMIT"'"
               },
               "sections": [
                 {