Skip to content

feat(CI): adding job to ensure opentelemetry version #1

feat(CI): adding job to ensure opentelemetry version

feat(CI): adding job to ensure opentelemetry version #1

name: Ensure singular opentelemetry version
on:
pull_request:
branches:
- "main"
paths:
- 'Cargo.lock'
- '.github/workflows/ensure-opentelemetry-version.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ensure-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: "🔭 Ensure singular opentelemetry version"
shell: bash
run: |
count=$(grep -n 'name = "opentelemetry"' Cargo.lock | wc -l)
if [ "$count" -gt 1 ]; then
exit 1
fi