Skip to content

Commit 8142a80

Browse files
authored
chore: add generator version to config (#2334)
* chore: add generator version to config * chore: setup reusable workflow * update googleapis commit
1 parent 59d4b0e commit 8142a80

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed

.github/workflows/hermetic_library_generation.yaml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,13 @@ name: Hermetic library generation upon generation config change through pull req
1717
on:
1818
pull_request:
1919

20-
env:
21-
HEAD_REF: ${{ github.head_ref }}
22-
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
23-
GITHUB_REPOSITORY: ${{ github.repository }}
24-
2520
jobs:
2621
library_generation:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v4
30-
with:
31-
fetch-depth: 0
32-
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
33-
- name: Generate changed libraries
34-
shell: bash
35-
run: |
36-
set -ex
37-
if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then
38-
echo "This PR comes from a fork. Generation will be skipped"
39-
exit 0
40-
fi
41-
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
42-
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
43-
bash .github/scripts/hermetic_library_generation.sh \
44-
--target_branch ${{ github.base_ref }} \
45-
--current_branch $HEAD_REF
46-
env:
47-
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
22+
uses: googleapis/google-cloud-java/.github/workflows/reusable_library_generation.yaml@chore/setup-reusable-workflow
23+
with:
24+
repo_full_name: ${{ github.event.pull_request.head.repo.full_name }}
25+
repository: ${{ github.repository }}
26+
base_ref: ${{ github.base_ref }}
27+
head_ref: ${{ github.head_ref }}
28+
secrets:
29+
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}

generation_config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
googleapis_commitish: c93b54fa3060c7185f6dc724f0f9ec0c12bc44fc
1+
gapic_generator_version: 2.44.0
2+
googleapis_commitish: eb4c1ec02412e65c453ef0bfc4347731e64dcc82
23
libraries_bom_version: 26.44.0
34
template_excludes:
45
- .gitignore

0 commit comments

Comments
 (0)