ci: harden workflow permissions, add timeout and concurrency gate

- permissions: contents: read — this workflow only builds and tests,
  it never writes to the repo; matches the convention deploy.yml
  already sets.
- timeout-minutes: 15 on the job so a hung step doesn't burn runner
  time indefinitely.
- concurrency group keyed on the ref so a new push cancels the
  in-flight run for the same branch/PR instead of queuing behind it.

Action versions are left unpinned (still @v4) — SHA-pinning only this
workflow while deploy.yml stays on @v4 would be an inconsistency to
clean up in its own pass, not here.
This commit is contained in:
FilipBl4gojevic
2026-07-27 15:35:01 +02:00
parent 9d4958500e
commit 01416af3ab
2 changed files with 9 additions and 1 deletions

View File

@@ -6,9 +6,17 @@ on:
push: push:
branches: [main] branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
build-and-test: build-and-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

2
.gitignore vendored
View File

@@ -40,4 +40,4 @@ mnemonic.txt
vector-audit-log.json vector-audit-log.json
# Incremental typecheck cache (npm run typecheck uses --incremental) # Incremental typecheck cache (npm run typecheck uses --incremental)
*.tsbuildinfo *.tsbuildinfo