From cc22b524c95ac9daf88ee6a329be2e16c7542ffa Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 21 Jan 2023 02:27:32 +0000 Subject: [PATCH] Updating github-config --- .github/workflows/approve-bot-pr.yml | 19 +++++++++++++++++++ .github/workflows/update-github-config.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/approve-bot-pr.yml b/.github/workflows/approve-bot-pr.yml index c798e647..3f45a3d7 100644 --- a/.github/workflows/approve-bot-pr.yml +++ b/.github/workflows/approve-bot-pr.yml @@ -67,3 +67,22 @@ jobs: gh pr merge ${{ needs.download.outputs.pr-number }} --auto --rebase env: GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + + failure: + name: Alert on Failure + runs-on: ubuntu-22.04 + needs: [download, approve] + if: ${{ always() && needs.download.result == 'failure' || needs.approve.result == 'failure' }} + steps: + - name: File Failure Alert Issue + uses: paketo-buildpacks/github-config/actions/issue/file@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + label: "failure:approve-bot-pr" + comment_if_exists: true + issue_title: "Failure: Approve bot PR workflow" + issue_body: | + Approve bot PR workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). + comment_body: | + Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/.github/workflows/update-github-config.yml b/.github/workflows/update-github-config.yml index 2196a8cf..90d512fc 100644 --- a/.github/workflows/update-github-config.yml +++ b/.github/workflows/update-github-config.yml @@ -61,3 +61,22 @@ jobs: title: "Updates github-config" branch: automation/github-config/update base: ${{ github.event.repository.default_branch }} + + failure: + name: Alert on Failure + runs-on: ubuntu-22.04 + needs: [build] + if: ${{ always() && needs.build.result == 'failure' }} + steps: + - name: File Failure Alert Issue + uses: paketo-buildpacks/github-config/actions/issue/file@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + label: "failure:update-github-config" + comment_if_exists: true + issue_title: "Failure: Update GitHub config workflow" + issue_body: | + Update GitHub config workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). + comment_body: | + Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}