You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/librarian_generation_check.yaml
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,19 @@
11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
name: Librarian generate diff check on pull requests
14
+
name: Librarian generate diff check
15
15
on:
16
-
pull_request:
16
+
push:
17
+
branches:
18
+
- main
19
+
workflow_dispatch:
17
20
18
21
jobs:
19
22
library_generation:
20
23
runs-on: ubuntu-24.04
24
+
permissions:
25
+
contents: read
26
+
issues: write
21
27
steps:
22
28
- uses: actions/checkout@v4
23
29
with:
@@ -66,3 +72,11 @@ jobs:
66
72
- name: Check for generated code changes
67
73
run: |
68
74
git diff --exit-code
75
+
- name: Create issue if previous step fails
76
+
if: ${{ failure() }}
77
+
env:
78
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79
+
run: |
80
+
gh issue create \
81
+
--title "Librarian generate diff check failed on main branch" \
82
+
--body "The librarian generate diff check failed on main branch. Please check the logs: https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"
0 commit comments