Skip to content

Commit a9307ce

Browse files
authored
Merge branch 'master' into copy-original-pr-info-to-gen-pr
2 parents afa2629 + 5357a2a commit a9307ce

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/generate-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
diff=$(git --no-pager diff --name-only HEAD)
3333
echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
3434
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
35-
## Run if diff exists and pull request, and make CI status failure
36-
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
35+
## Run if diff exists and pull request, and make CI status failure (but allow renovate bot)
36+
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }}
3737
run: |
3838
echo "There are changes in the generated codes. Please run 'generate-code.py' and commit the changes." >&2
3939
exit 1

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,20 @@ jobs:
5656
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
5757
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}
5858

59+
- name: Create GitHub Issue on Failure
60+
if: failure()
61+
uses: actions/github-script@v7
62+
with:
63+
script: |
64+
const { owner, repo } = context.repo;
65+
const version = process.env.VERSION;
66+
const issueTitle = `Release job for ${version} failed`;
67+
const issueBody = `The release job failed. Please check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.`;
68+
const assignees = [context.actor];
69+
await github.rest.issues.create({
70+
owner,
71+
repo,
72+
title: issueTitle,
73+
body: issueBody,
74+
assignees
75+
});

0 commit comments

Comments
 (0)