Skip to content

Commit 70f81cd

Browse files
committed
chore: add a configuration checker
1 parent 8c54055 commit 70f81cd

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,40 @@ jobs:
115115
uses: googleapis/java-cloud-bom/tests/[email protected]
116116
with:
117117
bom-path: gapic-libraries-bom/pom.xml
118+
generation-config-check:
119+
runs-on: ubuntu-latest
120+
steps:
121+
- uses: actions/checkout@v4
122+
- name: bind docker volume
123+
shell: bash
124+
run: |
125+
if [[ $(docker volume inspect ${volume_name}) != '[]' ]]; then
126+
docker volume rm ${volume_name}
127+
fi
128+
docker volume create \
129+
--name ${volume_name} \
130+
--opt "type=none" \
131+
--opt "device=$(pwd)" \
132+
--opt "o=bind"
133+
env:
134+
volume_name: repo
135+
- name: validate generation configuration
136+
shell: bash
137+
run: |
138+
docker run \
139+
--rm \
140+
-v "${volume_name}:${workspace_name}" \
141+
-v /tmp:/tmp \
142+
-v /var/run/docker.sock:/var/run/docker.sock \
143+
-e "RUNNING_IN_DOCKER=true" \
144+
-e "REPO_BINDING_VOLUMES=-v ${repo_volumes}" \
145+
gcr.io/cloud-devrel-public-resources/java-library-generation:"${library_generation_image_tag}" \
146+
python /src/cli/entry_point.py validate-generation-config \
147+
--generation-config-path="${workspace_name}/generation_config.yaml"
148+
env:
149+
library_generation_image_tag: latest
150+
volume_name: repo
151+
workspace_name: /workspace/repo
118152

119153
# TODO: Uncomment the needed Github Actions
120154
# dependencies:

0 commit comments

Comments
 (0)