Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/regenerate-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
go run "github.com/googleapis/librarian/cmd/librarian@${version}" generate -all -v

- name: Create issue on diff
if: failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -70,4 +69,19 @@ jobs:
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
gh issue comment "$EXISTING_ISSUE" --body "Another failure with diff occurred: $RUN_URL"
fi
fi
fi
- name: Create issue on generation failure
if: failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TITLE="Regeneration failed"
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
BODY="The post-submit [regeneration check]($RUN_URL) failed."
EXISTING_ISSUE=$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number')
if [ -z "$EXISTING_ISSUE" ]; then
gh issue create --title "$TITLE" --body "$BODY"
else
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
gh issue comment "$EXISTING_ISSUE" --body "Another regeneration failure occurred: $RUN_URL"
fi
Loading