Skip to content

Commit 5a18bc4

Browse files
authored
Pin otel/semconvgen image in Makefile (open-telemetry#1580)
1 parent 7aad901 commit 5a18bc4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Diff for: .github/workflows/checks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
steps:
6262
- uses: actions/checkout@v1
6363
- name: verify semantic convention tables
64-
run: docker run --rm -v $(pwd)/semantic_conventions:/source -v $(pwd)/specification:/spec otel/semconvgen:0.3.1 -f /source markdown -md /spec --md-check
64+
run: make table-check

Diff for: Makefile

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ MISSPELL_BINARY=bin/misspell
77
MISSPELL = $(TOOLS_DIR)/$(MISSPELL_BINARY)
88
MARKDOWN_LINK_CHECK=markdown-link-check
99
MARKDOWN_LINT=markdownlint
10-
10+
# see https://github.com/open-telemetry/build-tools/releases for semconvgen updates
11+
SEMCONVGEN_VERSION=0.3.1
1112

1213
.PHONY: install-misspell
1314
install-misspell:
@@ -40,9 +41,17 @@ install-markdownlint:
4041
markdownlint:
4142
@for f in $(ALL_DOCS); do echo $$f; $(MARKDOWN_LINT) -c .markdownlint.yaml $$f || exit 1; done
4243

44+
# Generate markdown tables from YAML definitions
4345
.PHONY: table-generation
4446
table-generation:
45-
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec otel/semconvgen -f /source markdown -md /spec
47+
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec \
48+
otel/semconvgen:$(SEMCONVGEN_VERSION) -f /source markdown -md /spec
49+
50+
# Check if current markdown tables differ from the ones that would be generated from YAML definitions
51+
.PHONY: table-check
52+
table-check:
53+
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec \
54+
otel/semconvgen:$(SEMCONVGEN_VERSION) -f /source markdown -md /spec --md-check
4655

4756
# Run all checks in order of speed / likely failure.
4857
.PHONY: check

0 commit comments

Comments
 (0)