Skip to content

Commit

Permalink
update gen workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed Sep 25, 2024
1 parent 7ba15ce commit a3c8f29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ on:
env:
HEAD_REF: ${{ github.head_ref }}
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_REPOSITORY: ${{ github.repository }}

jobs:
library_generation:
# skip pull requests coming from a forked repository
if: github.env.REPO_FULL_NAME == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -35,6 +34,10 @@ jobs:
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 \
Expand Down

0 comments on commit a3c8f29

Please sign in to comment.