diff --git a/.github/workflows/cp.yml b/.github/workflows/cp.yml index 09fb6f0..cdd1b64 100644 --- a/.github/workflows/cp.yml +++ b/.github/workflows/cp.yml @@ -155,3 +155,20 @@ jobs: repo: ${{ inputs.repo }} issue: ${{ inputs.issue }} run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/close-issue.sh | bash + + handle-failure: + needs: cherry_pick + runs-on: ubuntu-latest + if: failure() + steps: + - name: Add comment to issue + env: + GH_TOKEN: ${{ secrets.git_token }} + org: ${{ inputs.org }} + repo: ${{ inputs.repo }} + team: ${{ inputs.team }} + user: ${{ inputs.user }} + issue: ${{ inputs.issue }} + body: "Error occured" + run: | + curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/add-issue-commit.sh | bash diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 3f6883d..0dcaa95 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -96,3 +96,20 @@ jobs: repo: ${{ inputs.repo }} issue: ${{ inputs.issue }} run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/close-issue.sh | bash + + handle-failure: + needs: make_rc + runs-on: ubuntu-latest + if: failure() + steps: + - name: Add comment to issue + env: + GH_TOKEN: ${{ secrets.git_token }} + org: ${{ inputs.org }} + repo: ${{ inputs.repo }} + team: ${{ inputs.team }} + user: ${{ inputs.user }} + issue: ${{ inputs.issue }} + body: "Error occured" + run: | + curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/add-issue-commit.sh | bash