|
13 | 13 | type: boolean
|
14 | 14 | required: true
|
15 | 15 | default: false
|
| 16 | + deploy-dev-preprod-resync: |
| 17 | + description: Deploy to dev-preprod-resync |
| 18 | + type: boolean |
| 19 | + required: true |
| 20 | + default: false |
16 | 21 | deploy-staging-preprod:
|
17 | 22 | description: Deploy to staging-preprod
|
18 | 23 | type: boolean
|
@@ -117,6 +122,9 @@ jobs:
|
117 | 122 | if [ "true" == ${{ inputs.deploy-dev-preprod || false }} ] ; then
|
118 | 123 | echo '{"environment":"dev-preprod", "target":"dev-preprod@us-east-1@v2", "url": "https://dev-preprod.lw.iog.io/"}'
|
119 | 124 | fi
|
| 125 | + if [ "true" == ${{ inputs.deploy-dev-preprod-resync || false }} ] ; then |
| 126 | + echo '{"environment":"dev-preprod-resync", "target":"dev-preprod-resync@us-east-1@v2", "url": "https://dev-preprod-resync.lw.iog.io/"}' |
| 127 | + fi |
120 | 128 | if [ "true" == ${{ inputs.deploy-staging-preprod || false }} ] ; then
|
121 | 129 | echo '{"environment":"staging-preprod", "target":"staging-preprod@us-east-1@v2", "url": "https://staging-preprod.lw.iog.io/"}'
|
122 | 130 | fi
|
@@ -230,10 +238,10 @@ jobs:
|
230 | 238 | printf "" >pr-comment.md
|
231 | 239 |
|
232 | 240 | for target in \
|
233 |
| - ${{ github.base_ref == 'master' && '"dev-preview@us-east-1"' || '' }} \ |
234 |
| - ${{ github.base_ref == 'master' && '"dev-preprod@us-east-1@v2"' || '' }} \ |
235 |
| - ${{ github.base_ref == 'master' && '"dev-mainnet@us-east-1"' || '' }} \ |
236 |
| - ${{ github.base_ref == 'conway-era' && '"dev-sanchonet@us-east-1@v1"' || '' }} \ |
| 241 | + "dev-preview@us-east-1" \ |
| 242 | + "dev-preprod@us-east-1@v2" \ |
| 243 | + "dev-preprod-resync@us-east-1@v2" \ |
| 244 | + "dev-mainnet@us-east-1" \ |
237 | 245 | ; do
|
238 | 246 | git restore .kube
|
239 | 247 | nix run -L ".#cardano-services.${target}.plan" | tee k8s-plan.diff
|
@@ -269,15 +277,17 @@ jobs:
|
269 | 277 | | jq -r --arg commentMarker "$COMMENT_MARKER" 'first(.[] | select(.body | contains($commentMarker)) | .id)'
|
270 | 278 | )
|
271 | 279 | if [ -z "$existingCommentId" ]; then
|
272 |
| - gh pr comment "$prNumber" --body "$(cat pr-comment.md) <!-- $COMMENT_MARKER -->" |
| 280 | + ( cat pr-comment.md && echo "<!-- $COMMENT_MARKER -->" ; ) >gh-pr-comment-data.md |
| 281 | + gh pr comment "$prNumber" --body-file gh-pr-comment-data.md |
273 | 282 | else
|
| 283 | + jq --null-input --rawfile body pr-comment.md --arg marker "<!-- $COMMENT_MARKER -->" '{body: ($body + $marker)}' >curl-patch-data.json |
274 | 284 | curl --fail-with-body -sSL \
|
275 | 285 | -X PATCH \
|
276 | 286 | -H "Authorization: Bearer $GH_TOKEN" \
|
277 | 287 | -H "Accept: application/vnd.github+json" \
|
278 | 288 | -H "X-GitHub-Api-Version: 2022-11-28" \
|
279 | 289 | "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/comments/${existingCommentId}" \
|
280 |
| - -d "$(jq --null-input --arg body "$(cat pr-comment.md) <!-- $COMMENT_MARKER -->" '{body: $body}')" |
| 290 | + -d @curl-patch-data.json |
281 | 291 | fi
|
282 | 292 |
|
283 | 293 | deploy:
|
|
0 commit comments