Skip to content

Commit b6013a2

Browse files
authored
Merge pull request #1 from pre-commit-ci/initial
initial commit
2 parents 6818b84 + 376adf1 commit b6013a2

File tree

8 files changed

+1866
-0
lines changed

8 files changed

+1866
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: (internal)
2+
description: (internal)
3+
inputs:
4+
name:
5+
required: true
6+
file:
7+
required: true
8+
runs:
9+
using: node20
10+
main: main.mjs

.github/actions/internal/main.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import child_process from 'child_process';
2+
3+
const args = ['dist/index.js', process.env.INPUT_NAME, process.env.INPUT_FILE];
4+
child_process.execFileSync('node', args, {stdio: 'inherit'});

.github/workflows/main.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches: [main, test-me-*]
5+
6+
jobs:
7+
main:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 20.x
14+
- run: npm i
15+
- run: npm run package
16+
- uses: ./.github/actions/internal
17+
with:
18+
name: dist
19+
file: dist/index.js

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/node_modules

index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {DefaultArtifactClient} from '@actions/artifact'
2+
3+
if (process.argv.length < 4) {
4+
console.error('usage `upload-artifact-cli artifact-name file [file ...]`');
5+
process.exit(1);
6+
}
7+
8+
await new DefaultArtifactClient().uploadArtifact(
9+
process.argv[2],
10+
process.argv.slice(3),
11+
'.',
12+
{retentionDays: 1}
13+
);

0 commit comments

Comments
 (0)