mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-12-22 12:11:06 +01:00
chore: validate tags
This commit is contained in:
parent
f031102cc0
commit
b42de46426
4 changed files with 48 additions and 0 deletions
28
.github/workflows/tag-validation.yml
vendored
Normal file
28
.github/workflows/tag-validation.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: test
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Bun
|
||||
uses: xhyrom/setup-bun@v0.1.3
|
||||
with:
|
||||
bun-version: latest
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get changed files
|
||||
uses: Mineflash07/gh-action-get-changed-files@feature/support-pr-target-event
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Add json
|
||||
run: cp $HOME/files.json ./scripts/validateTags/
|
||||
|
||||
- name: Validate tags
|
||||
run: bun run validate
|
6
scripts/validateTags/package.json
Normal file
6
scripts/validateTags/package.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "validate-tags",
|
||||
"scripts": {
|
||||
"start": "bun src/index.ts"
|
||||
}
|
||||
}
|
4
scripts/validateTags/src/index.ts
Normal file
4
scripts/validateTags/src/index.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
const files = await Bun.file('./files.json').text();
|
||||
console.log(files);
|
||||
|
||||
export { };
|
10
scripts/validateTags/tsconfig.json
Normal file
10
scripts/validateTags/tsconfig.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"moduleResolution": "Node",
|
||||
// "bun-types" is the important part
|
||||
"types": ["bun-types"]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue