fix: adjust timeout
This commit is contained in:
parent
6e6e771631
commit
bb15293dd3
2 changed files with 35 additions and 12 deletions
45
.github/actions/notify/action.yaml
vendored
45
.github/actions/notify/action.yaml
vendored
|
|
@ -38,6 +38,19 @@ inputs:
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
# - name: event list
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# cat <<'EOF'
|
||||||
|
# ${{ toJSON(github) }}
|
||||||
|
# EOF
|
||||||
|
#
|
||||||
|
# - name: print env
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# env
|
||||||
|
# exit 1
|
||||||
|
|
||||||
- name: Install prerequisites
|
- name: Install prerequisites
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -54,23 +67,23 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PAYLOAD=$(jq -n \
|
PAYLOAD=$(jq -n -r \
|
||||||
--arg header_title "${{ inputs.title }}" \
|
--arg header "${{ inputs.title }}" \
|
||||||
--arg repo "${{ github.repository || '' }}" \
|
--arg repo "${{ github.repository || '' }}" \
|
||||||
--arg title "${{ inputs.event_title || 'no event title given' }}" \
|
--arg title "${{ inputs.event_title || 'no event title given' }}" \
|
||||||
--arg body "${{ inputs.event_body || 'no event body given' }}" \
|
--arg body "${{ inputs.event_body || 'no event body given' }}" \
|
||||||
--arg author "${{ inputs.event_author || 'no event author 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": {
|
"header": {
|
||||||
"title": "$header_title",
|
"title": "\($header)",
|
||||||
"subtitle": "Repo: \($repo)",
|
"subtitle": "Repo: \($repo)",
|
||||||
"imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png",
|
"imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png",
|
||||||
"imageType": "SQUARE"
|
"imageType": "SQUARE"
|
||||||
},
|
},
|
||||||
"sections": [
|
"sections": [
|
||||||
{
|
{
|
||||||
"header": $title,
|
"header": "\($title)",
|
||||||
"collapsible": false,
|
"collapsible": false,
|
||||||
"widgets": [
|
"widgets": [
|
||||||
{
|
{
|
||||||
|
|
@ -83,7 +96,7 @@ runs:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"textParagraph": {
|
"textParagraph": {
|
||||||
"text": $body,
|
"text": "\($body)",
|
||||||
"maxLines": 2
|
"maxLines": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +112,7 @@ runs:
|
||||||
"type": "FILLED",
|
"type": "FILLED",
|
||||||
"onClick": {
|
"onClick": {
|
||||||
"openLink": {
|
"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 \
|
curl \
|
||||||
--fail-with-body \
|
--fail-with-body \
|
||||||
-X POST \
|
-X POST \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
"${{ inputs.webhook_url }}&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD&threadKey=${{ github.repository }}/pr/${{ inputs.event_number }}" \
|
"${{ inputs.webhook_url }}" \
|
||||||
-d "$(jq -n --argjson card "$PAYLOAD" '{ "cardsV2": [ { "cardId": "new-pr", "card": $card } ] }')"
|
-d "${PAYLOAD}"
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ func CreateInstanceWaitHandler(
|
||||||
) *wait.AsyncActionHandler[v3alpha1api.GetInstanceResponse] {
|
) *wait.AsyncActionHandler[v3alpha1api.GetInstanceResponse] {
|
||||||
instanceCreated := false
|
instanceCreated := false
|
||||||
var instanceGetResponse *v3alpha1api.GetInstanceResponse
|
var instanceGetResponse *v3alpha1api.GetInstanceResponse
|
||||||
maxWait := time.Minute * 45
|
maxWait := time.Minute * 90
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
extendedTimeout := 0
|
extendedTimeout := 0
|
||||||
maxFailedCount := 3
|
maxFailedCount := 3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue