Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ImLunaHey committed Mar 1, 2024
1 parent 7b0640c commit 4c7546c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
id: test-action
uses: ./
with:
axiom_datasets: 'luna-test'
axiom_datasets: 'annotations-github-action'
axiom_token: ${{ secrets.AXIOM_TOKEN }}
title: 'Test Title'
description: 'Test Description'
Expand Down
10 changes: 5 additions & 5 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('action', () => {
// Set the action's inputs as return values from core.getInput()
getInputMock.mockImplementation((name: string) => {
switch (name) {
case 'axiom_dataset':
return '500'
case 'axiom_datasets':
return 'test-dataset'
case 'axiom_token':
return 'test'
case 'title':
Expand Down Expand Up @@ -71,8 +71,8 @@ describe('action', () => {
// Set the action's inputs as return values from core.getInput()
getInputMock.mockImplementation((name: string) => {
switch (name) {
case 'axiom_dataset':
return '500'
case 'axiom_datasets':
return 'test-dataset'
case 'axiom_token':
return 'test'
case 'title':
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('action', () => {
// Verify that all of the core library functions were called correctly
expect(setFailedMock).toHaveBeenNthCalledWith(
1,
'Input required and not supplied: axiom_dataset'
'Input required and not supplied: axiom_datasets'
)
expect(errorMock).not.toHaveBeenCalled()
})
Expand Down
12 changes: 7 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import * as core from '@actions/core'
*/
export async function run(): Promise<void> {
try {
const datasets = [core.getInput('axiom_dataset', { required: true })]
const datasets = core
.getInput('axiom_datasets', { required: true })
.split(',')
const token = core.getInput('axiom_token', { required: true })
const title = core.getInput('title', { required: true })
const description = core.getInput('description', { required: true })
Expand Down

0 comments on commit 4c7546c

Please sign in to comment.