Auto PR: dev to main #258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'action-check-typescript' | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write # Ensures that the workflow token can write to the repository contents | |
| pull-requests: write # Ensures the token can write to pull requests | |
| jobs: | |
| ts: | |
| # https://stackoverflow.com/a/70448851 | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get diff lines | |
| id: diff | |
| uses: Equip-Collaboration/diff-line-numbers@v1.1.0 | |
| with: | |
| include: '["\\.ts$", "\\.vue$"]' # Adjusted to include .vue files | |
| - name: Detecting files changed | |
| id: files | |
| uses: umani/changed-files@v4.2.0 | |
| with: | |
| repo-token: ${{ github.token }} | |
| pattern: '^.*\.(ts|vue)$' # Adjusted to include .vue files | |
| - name: List files changed (you can remove this step, for monitoring only) | |
| run: | | |
| echo 'Files modified: ${{steps.files.outputs.files_updated}}' | |
| echo 'Files added: ${{steps.files.outputs.files_created}}' | |
| echo 'Files removed: ${{steps.files.outputs.files_deleted}}' | |
| - uses: Arhia/action-check-typescript@v1.1.0 # Ensure this version supports .vue files or find an alternative | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| use-check: true | |
| check-fail-mode: added | |
| files-changed: ${{steps.files.outputs.files_updated}} | |
| files-added: ${{steps.files.outputs.files_created}} | |
| files-deleted: ${{steps.files.outputs.files_deleted}} | |
| line-numbers: ${{steps.diff.outputs.lineNumbers}} | |
| output-behaviour: both | |
| comment-behaviour: new |