Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge code generation changes to main #295

Merged
20 changes: 17 additions & 3 deletions .github/workflows/semconvgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Semantic Convention Generator
on:
push:
tags: [ '**' ]
branches: [ main ]
branches:
- main
- 'feature/**'
pull_request:
branches: [ main ]
branches:
- main
- 'feature/**'
paths:
- .github/workflows/semconvgen.yml
- 'semantic-conventions/**'
Expand All @@ -13,7 +17,7 @@ jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
run:
working-directory: semantic-conventions/
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,3 +73,13 @@ jobs:
else
tag_and_push "${GITHUB_REF#"refs/tags/"}"
fi
- name: Push the Dev Docker image
if: startsWith(github.ref, 'refs/heads/feature/')
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
function tag_and_push {
docker tag semconvgen "otel/semconvgen:${1}" && docker push "otel/semconvgen:${1}"
}
TAG="${GITHUB_REF#"refs/heads/"}"
TAG="${TAG/"/"/"-"}"
tag_and_push "${TAG}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

# Vim
.swp

# Python
*.whl
12 changes: 12 additions & 0 deletions semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ Please update the changelog as part of any significant pull request.
([#271](https://github.com/open-telemetry/build-tools/pull/271))
- Add link to requirement levels definition from Markdown table title.
([#222](https://github.com/open-telemetry/build-tools/pull/222))
- Added code-generation mode that groups attributes by the root namespace and ability to write each group into individual file.
[BREAKING] The `--file-per-group <pattern>` that used to create multiple directories (like `output/<pattern>/file`) now generates
multiple files (`output/<pattern>file`) instead.
([#243](https://github.com/open-telemetry/build-tools/pull/243))
- Update `semconvgen.yml` workflow to run on feature/* branches.
([#256](https://github.com/open-telemetry/build-tools/pull/256))
- Allow --output to be templatized when generating multiple files.
([#263](https://github.com/open-telemetry/build-tools/pull/263))
- Add `metrics` to the context of non-scoped code generation
([#270](https://github.com/open-telemetry/build-tools/pull/270))
- Add `enum_attributes` to the context, adds `print_member_value` helper
([#266](https://github.com/open-telemetry/build-tools/pull/266))
- Sort attribute tables by requirement level and attribute name
([#260](https://github.com/open-telemetry/build-tools/pull/260))

Expand Down
Loading
Loading