Skip to content

Commit 662a3bf

Browse files
committed
Updating github-config
1 parent b0e8939 commit 662a3bf

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/labels.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@
2828
- name: good first issue
2929
description: A good first issue to get started with
3030
color: d3fc03
31+
- name: "failure:release"
32+
description: An issue filed automatically when a release workflow run fails
33+
color: f00a0a
34+
- name: "failure:push"
35+
description: An issue filed automatically when a push buildpackage workflow run fails
36+
color: f00a0a

.github/workflows/create-draft-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,22 @@ jobs:
8585
"content_type": "application/x-tar"
8686
}
8787
]
88+
89+
failure:
90+
name: Alert on Failure
91+
runs-on: ubuntu-latest
92+
needs: [ integration, release ]
93+
if: ${{ always() && needs.integration.result == 'failure' || needs.release.result == 'failure' }}
94+
steps:
95+
- name: File Failure Alert Issue
96+
uses: paketo-buildpacks/github-config/actions/issue/file@main
97+
with:
98+
token: ${{ secrets.GITHUB_TOKEN }}
99+
repo: ${{ github.repository }}
100+
label: "failure:release"
101+
comment_if_exists: true
102+
issue_title: "Failure: Create Draft Release workflow"
103+
issue_body: |
104+
Create Draft Release workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
105+
comment_body: |
106+
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

.github/workflows/push-buildpackage.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,22 @@ jobs:
7373
version: ${{ steps.event.outputs.tag_full }}
7474
address: ${{ steps.push.outputs.image }}@${{ steps.push.outputs.digest }}
7575
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
76+
77+
failure:
78+
name: Alert on Failure
79+
runs-on: ubuntu-latest
80+
needs: [push]
81+
if: ${{ always() && needs.push.result == 'failure' }}
82+
steps:
83+
- name: File Failure Alert Issue
84+
uses: paketo-buildpacks/github-config/actions/issue/file@main
85+
with:
86+
token: ${{ secrets.GITHUB_TOKEN }}
87+
repo: ${{ github.repository }}
88+
label: "failure:push"
89+
comment_if_exists: true
90+
issue_title: "Failure: Push Buildpackage workflow"
91+
issue_body: |
92+
Push Buildpackage workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
93+
comment_body: |
94+
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

0 commit comments

Comments
 (0)