llama-stack-mirror/scripts
Mohit Gaur 5ef2baacdc
fix: update check-workflows-use-hashes to use github error format (#2875)
# What does this PR do?
Updates the script `scripts/check-workflows-use-hashes.sh` to improve
error reporting by adopting GitHub Actions error annotation format.

* Updated the script to use GitHub Actions error annotation format
(`::error file={name},line={line},col={col}::{message}`) making error
messages more actionable and easier to locate in workflows.
* Modified the script to include line numbers for `uses:` references by
using `grep -n` and extracting line numbers, improving the precision of
error reporting.

Closes #2778

## Test Plan

- Violation check - Created test file with mixed SHA/non-SHA actions

```
echo 'uses: actions/checkout@v4' > test-workflow.yml
echo 'uses: actions/upload-artifact@main' >> test-workflow.yml
```
Result: Correctly detected violations with precise line numbers
```
./scripts/check-workflows-use-hashes.sh
Output:
::error file=test-workflow.yml,line=14::uses non-SHA action ref: uses: actions/checkout@v4
::error file=test-workflow.yml,line=20::uses non-SHA action ref: uses: actions/upload-artifact@main
```

- Verified existing project workflows pass
```
./scripts/check-workflows-use-hashes.sh
# Result: Exit code 0 (all workflows properly SHA-pinned)
```
2025-07-24 17:41:17 +02:00
..
check-init-py.sh ci: vector_io provider integration tests (#2537) 2025-06-26 17:04:32 -07:00
check-workflows-use-hashes.sh fix: update check-workflows-use-hashes to use github error format (#2875) 2025-07-24 17:41:17 +02:00
distro_codegen.py chore: remove dead code (#2403) 2025-06-05 21:17:54 +02:00
gen-changelog.py chore: enable ruff for ./scripts too (#1643) 2025-03-18 12:17:21 -07:00
generate_prompt_format.py refactor: move all llama code to models/llama out of meta reference (#1887) 2025-04-07 15:03:58 -07:00
install.sh fix(install): explicit docker.io usage (#2850) 2025-07-22 20:36:48 +02:00
provider_codegen.py docs: auto generated documentation for providers (#2543) 2025-06-30 15:13:20 +02:00
run_client_sdk_tests.py chore: consolidate scripts under ./scripts directory (#1646) 2025-03-17 17:56:30 -04:00
setup_telemetry.sh feat: improve telemetry (#2590) 2025-07-04 17:29:09 +02:00
unit-tests.sh test: Measure and track code coverage (#2636) 2025-07-18 18:08:36 +02:00