Skip to content

Commit

Permalink
adding job to ensure opentelemetry version
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa committed Jun 18, 2024
1 parent 8dea0aa commit fe40211
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ensure-opentelemetry-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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

0 comments on commit fe40211

Please sign in to comment.