Skip to content

Commit

Permalink
chore: use workflow in google-cloud-java
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed Sep 3, 2024
1 parent 1e9c8ab commit 2818bef
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,10 @@ name: Hermetic library generation upon generation config change through pull req
on:
pull_request:

env:
HEAD_REF: ${{ github.head_ref }}
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_REPOSITORY: ${{ github.repository }}

jobs:
library_generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: googleapis/google-cloud-java/.github/workflows/hermetic_library_generation.yaml@main
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- name: Generate changed libraries
shell: bash
run: |
set -ex
if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then
echo "This PR comes from a fork. Generation will be skipped"
exit 0
fi
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
bash .github/scripts/hermetic_library_generation.sh \
--target_branch ${{ github.base_ref }} \
--current_branch $HEAD_REF
env:
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}

0 comments on commit 2818bef

Please sign in to comment.