From b42de464264f5eaa5a908c0fc7b7abb2cdbb22f7 Mon Sep 17 00:00:00 2001 From: xHyroM Date: Sat, 16 Jul 2022 14:24:19 +0200 Subject: [PATCH] chore: validate tags --- .github/workflows/tag-validation.yml | 28 ++++++++++++++++++++++++++++ scripts/validateTags/package.json | 6 ++++++ scripts/validateTags/src/index.ts | 4 ++++ scripts/validateTags/tsconfig.json | 10 ++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .github/workflows/tag-validation.yml create mode 100644 scripts/validateTags/package.json create mode 100644 scripts/validateTags/src/index.ts create mode 100644 scripts/validateTags/tsconfig.json diff --git a/.github/workflows/tag-validation.yml b/.github/workflows/tag-validation.yml new file mode 100644 index 0000000..c2cb145 --- /dev/null +++ b/.github/workflows/tag-validation.yml @@ -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 diff --git a/scripts/validateTags/package.json b/scripts/validateTags/package.json new file mode 100644 index 0000000..d263880 --- /dev/null +++ b/scripts/validateTags/package.json @@ -0,0 +1,6 @@ +{ + "name": "validate-tags", + "scripts": { + "start": "bun src/index.ts" + } +} \ No newline at end of file diff --git a/scripts/validateTags/src/index.ts b/scripts/validateTags/src/index.ts new file mode 100644 index 0000000..9d16e98 --- /dev/null +++ b/scripts/validateTags/src/index.ts @@ -0,0 +1,4 @@ +const files = await Bun.file('./files.json').text(); +console.log(files); + +export { }; diff --git a/scripts/validateTags/tsconfig.json b/scripts/validateTags/tsconfig.json new file mode 100644 index 0000000..6e28d70 --- /dev/null +++ b/scripts/validateTags/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "esnext", + "target": "esnext", + "moduleResolution": "Node", + // "bun-types" is the important part + "types": ["bun-types"] + } +} \ No newline at end of file