diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index c4da2bef..8c3fbdd1 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -38,6 +38,19 @@ inputs: runs: using: "composite" steps: +# - name: event list +# shell: bash +# run: | +# cat <<'EOF' +# ${{ toJSON(github) }} +# EOF +# +# - name: print env +# shell: bash +# run: | +# env +# exit 1 + - name: Install prerequisites shell: bash run: | @@ -54,23 +67,23 @@ runs: run: | set -e - PAYLOAD=$(jq -n \ - --arg header_title "${{ inputs.title }}" \ + PAYLOAD=$(jq -n -r \ + --arg header "${{ inputs.title }}" \ --arg repo "${{ github.repository || '' }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg author "${{ inputs.event_author || 'no event author given' }}" \ - --arg url "${{ inputs.event_url || 'no event url given' }}" \ - '{ + --arg url "${{ inputs.event_url || github.repositoryUrl || github.server_url }}" \ + '{ "cardsV2": [ { "cardId": "notify-${{ github.run_id }}", "card": { "header": { - "title": "$header_title", + "title": "\($header)", "subtitle": "Repo: \($repo)", "imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png", "imageType": "SQUARE" }, "sections": [ { - "header": $title, + "header": "\($title)", "collapsible": false, "widgets": [ { @@ -83,7 +96,7 @@ runs: }, { "textParagraph": { - "text": $body, + "text": "\($body)", "maxLines": 2 } } @@ -99,7 +112,7 @@ runs: "type": "FILLED", "onClick": { "openLink": { - "url": $url + "url": "\($url)" } } } @@ -109,11 +122,21 @@ runs: ] } ] - }') + }} ] }') + + #curl \ + # --fail-with-body \ + # -X POST \ + # -H 'Content-Type: application/json' \ + # "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ + # -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": "\($card)" } ] }')" + + #CARD=$(jq -n --argjson card $(echo $PAYLOAD | jq -r) '{ "cardsV2": [ { "cardId": "notify", "card": $card } ] }') + echo "${PAYLOAD}" | jq -r curl \ --fail-with-body \ -X POST \ -H 'Content-Type: application/json' \ - "${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \ - -d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": $card } ] }')" + "${{ inputs.webhook_url }}" \ + -d "${PAYLOAD}" diff --git a/stackit/internal/wait/postgresflexalpha/wait.go b/stackit/internal/wait/postgresflexalpha/wait.go index 71877f76..930fe501 100644 --- a/stackit/internal/wait/postgresflexalpha/wait.go +++ b/stackit/internal/wait/postgresflexalpha/wait.go @@ -58,7 +58,7 @@ func CreateInstanceWaitHandler( ) *wait.AsyncActionHandler[v3alpha1api.GetInstanceResponse] { instanceCreated := false var instanceGetResponse *v3alpha1api.GetInstanceResponse - maxWait := time.Minute * 45 + maxWait := time.Minute * 90 startTime := time.Now() extendedTimeout := 0 maxFailedCount := 3