Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61ec4c0

Browse files
committed
Add pre and post support to run command
1 parent 0263bad commit 61ec4c0

File tree

29 files changed

+456
-121
lines changed

29 files changed

+456
-121
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { run } = require('./main')
2+
3+
run()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { getInput, info, setOutput } = require('@actions/core')
2+
3+
async function run() {
4+
const myInput = getInput('myInput')
5+
6+
setOutput('myOutput', myInput)
7+
8+
info('JavaScript Action Succeeded!')
9+
}
10+
11+
module.exports = {
12+
run
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { run } = require('./main')
2+
3+
run()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { getInput, info, setOutput } = require('@actions/core')
2+
3+
async function run() {
4+
const myInput = getInput('myInput')
5+
6+
setOutput('myOutput', myInput)
7+
8+
info('JavaScript Action Succeeded!')
9+
}
10+
11+
module.exports = {
12+
run
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { run } = require('./main')
2+
3+
run()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { getInput, info, setOutput } = require('@actions/core')
2+
3+
async function run() {
4+
const myInput = getInput('myInput')
5+
6+
setOutput('myOutput', myInput)
7+
8+
info('JavaScript Action Succeeded!')
9+
}
10+
11+
module.exports = {
12+
run
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { run } = require('./main')
2+
3+
run()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { getInput, info, setOutput } = require('@actions/core')
2+
3+
async function run() {
4+
const myInput = getInput('myInput')
5+
6+
setOutput('myOutput', myInput)
7+
8+
info('JavaScript Action Succeeded!')
9+
}
10+
11+
module.exports = {
12+
run
13+
}

__fixtures__/path.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { jest } from '@jest/globals'
2+
3+
export const resolve = jest.fn()
4+
5+
export default {
6+
resolve
7+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { run } from './main.js'
2+
3+
run()

0 commit comments

Comments
 (0)