diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 02a6beb7..d8a8a15e 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -8,9 +8,26 @@ jobs: permissions: {} runs-on: "ubuntu-latest" steps: - - shell: "pwsh" - run: |- - Invoke-WebRequest -Uri 'https://cdn.prod.website-files.com/6257adef93867e50d84d30e2/636e0b52aa9e99b832574a53_full_logo_blurple_RGB.png' -MaximumRedirection 1 -MaximumRetryCount 5 -RetryIntervalSec 5 -Method 'Get' -OutFile 'thumbnail.png' + - uses: "hugoalh/send-discord-webhook-ghaction/_build@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "Hello, text channel!" + - uses: "hugoalh/send-discord-webhook-ghaction/_build@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "Hello, thread 0!" + thread_id: "1281905279075876887" + - uses: "hugoalh/send-discord-webhook-ghaction/_build@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_FORUM}}" + content: "Hello, forum thread!" + thread_name: "Test" + thread_tags: |- + 1281904394861936640 + 1281904417821425735 + 1281904437387989123 + 1281995616490094684 + 1281995653186195497 - uses: "hugoalh/send-discord-webhook-ghaction/_build@main" with: key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" @@ -49,8 +66,11 @@ jobs: "value": "You're welcome :wink:" } ], + "thumbnail": { + "url": "https://i.imgur.com/R66g1Pe.jpg" + }, "image": { - "url": "attachment://thumbnail.png" + "url": "https://i.imgur.com/R66g1Pe.jpg" }, "footer": { "text": "Woah! So cool! :smirk:", @@ -58,6 +78,12 @@ jobs: } } ] + - shell: "pwsh" + run: |- + Invoke-WebRequest -Uri 'https://cdn.prod.website-files.com/6257adef93867e50d84d30e2/636e0b52aa9e99b832574a53_full_logo_blurple_RGB.png' -MaximumRedirection 1 -MaximumRetryCount 5 -RetryIntervalSec 5 -Method 'Get' -OutFile 'thumbnail.png' + - uses: "hugoalh/send-discord-webhook-ghaction/_build@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "This is the Discord logo." files: |- thumbnail.png - files_glob: "false" diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 162026ef..362352e3 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -8,9 +8,26 @@ jobs: permissions: {} runs-on: "ubuntu-latest" steps: - - shell: "pwsh" - run: |- - Invoke-WebRequest -Uri 'https://cdn.prod.website-files.com/6257adef93867e50d84d30e2/636e0b52aa9e99b832574a53_full_logo_blurple_RGB.png' -MaximumRedirection 1 -MaximumRetryCount 5 -RetryIntervalSec 5 -Method 'Get' -OutFile 'thumbnail.png' + - uses: "hugoalh/send-discord-webhook-ghaction@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "Hello, text channel!" + - uses: "hugoalh/send-discord-webhook-ghaction@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "Hello, thread 0!" + thread_id: "1281905279075876887" + - uses: "hugoalh/send-discord-webhook-ghaction@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_FORUM}}" + content: "Hello, forum thread!" + thread_name: "Test" + thread_tags: |- + 1281904394861936640 + 1281904417821425735 + 1281904437387989123 + 1281995616490094684 + 1281995653186195497 - uses: "hugoalh/send-discord-webhook-ghaction@main" with: key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" @@ -49,8 +66,11 @@ jobs: "value": "You're welcome :wink:" } ], + "thumbnail": { + "url": "https://i.imgur.com/R66g1Pe.jpg" + }, "image": { - "url": "attachment://thumbnail.png" + "url": "https://i.imgur.com/R66g1Pe.jpg" }, "footer": { "text": "Woah! So cool! :smirk:", @@ -58,6 +78,12 @@ jobs: } } ] + - shell: "pwsh" + run: |- + Invoke-WebRequest -Uri 'https://cdn.prod.website-files.com/6257adef93867e50d84d30e2/636e0b52aa9e99b832574a53_full_logo_blurple_RGB.png' -MaximumRedirection 1 -MaximumRetryCount 5 -RetryIntervalSec 5 -Method 'Get' -OutFile 'thumbnail.png' + - uses: "hugoalh/send-discord-webhook-ghaction@main" + with: + key: "${{secrets.DISCORD_TEST_WEBHOOK_TEXT}}" + content: "This is the Discord logo." files: |- thumbnail.png - files_glob: "false"