Skip to content

Commit

Permalink
check-fail-notify: 修正PRを出すようにする (#3665)
Browse files Browse the repository at this point in the history
* check-fail-notify: 修正PRを出すようにする

* fail-notifyが間違ってたので直してあげたよ! (#3666)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
massongit and github-actions[bot] authored Oct 7, 2023
1 parent 22300c1 commit ac49e35
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/check-fail-notify.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/fail-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- Add to Task List
- CodeQL
- Dependency Review
- check-fail-notify
- fix-fail-notify
- format-json-yml
- gcr-cleaner
- github-actions-cache-cleaner
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/fix-fail-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: fix-fail-notify
on:
pull_request:
push:
branches:
- master
jobs:
fix-fail-notify:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
token: ${{secrets.CREATE_WORKFLOW_CI_TOKEN}}
- run: bash "${GITHUB_WORKSPACE}/scripts/fix_fail_notify/fix_fail_notify/fix_fail_notify.sh"
- uses: dev-hato/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-fail-notify
pr-title-prefix: fail-notifyが間違ってたので直してあげたよ!
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ workflows_dir=.github/workflows
fail_notify_workflow_file="${workflows_dir}/fail-notify.yml"
workflows="$(find "${workflows_dir}" -not -path "${fail_notify_workflow_file}" -type f -exec yq '.name' {} \; | sort | sed -e 's/^\(.*\)$/"\1"/g' | tr '\n' ',' | sed -e 's/,$//g')"
yq -i ".on.workflow_run.workflows=[${workflows}]" "${fail_notify_workflow_file}"
diff="$(git diff)"
echo "${diff}"
diff="${diff//'%'/'%25'}"
diff="${diff//$'\n'/'%0A'}"
diff="${diff//$'\r'/'%0D'}"
echo "diff=${diff}" >>"${GITHUB_OUTPUT}"

0 comments on commit ac49e35

Please sign in to comment.