feat(semconv): autoload namespaces so a single require exposes all constants #29
Workflow file for this run
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: Renovate Semantic Conventions Post-Update | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, edited] | |
| paths: | |
| - 'semantic_conventions/Rakefile' | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| regenerate-semconv: | |
| # Only run on Renovate PRs | |
| if: startsWith(github.head_ref, 'renovate/') | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0 | |
| with: | |
| ruby-version: '4.0.5' | |
| bundler-cache: true | |
| working-directory: semantic_conventions | |
| - name: Check if SPEC_VERSION changed | |
| id: check_changes | |
| env: | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| git fetch origin "$BASE_REF" | |
| if git diff "origin/$BASE_REF" HEAD -- semantic_conventions/Rakefile | grep -q "SPEC_VERSION"; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Regenerate semantic conventions | |
| if: steps.check_changes.outputs.changed == 'true' | |
| working-directory: semantic_conventions | |
| run: bundle exec rake generate | |
| - name: Commit and push changes | |
| if: steps.check_changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add semantic_conventions/ | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "chore: regenerate semantic conventions" | |
| git push | |
| fi |