Skip to content

Commit

Permalink
Test action
Browse files Browse the repository at this point in the history
  • Loading branch information
danibonilha committed Dec 22, 2023
1 parent 9006d87 commit 402f6fe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

name: Test action

on: push

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test
id: test
uses: ./
with:
threadName: 'v1.0-test'
channellName: 'bifrost'
message: 'testing action'
webhookUrl: ${{ secrets.HUBOT_WEBHOOK_URl }}
webhookAuth: ${{ secrets.HUBOT_WEBHOOK_AUTH }}
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function createThread(): Promise<void> {
const webhookUrl: string = core.getInput('webhookUrl')
const webhookAuth: string = core.getInput('webhookAuth')

await fetch(webhookUrl, {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
Accept: 'application/json',
Expand All @@ -22,6 +22,8 @@ export async function createThread(): Promise<void> {
})
})

core.info(response)
core.info(JSON.stringify(response))
core.info('Thread created')
} catch (error) {
// Fail the workflow run if an error occurs
Expand Down

0 comments on commit 402f6fe

Please sign in to comment.