Skip to content

Commit ccef0f5

Browse files
committed
adding github workflows
1 parent 88c42d2 commit ccef0f5

17 files changed

Lines changed: 1268 additions & 0 deletions

.github/.syncignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CODEOWNERS

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @paketo-buildpacks/builders-maintainers

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
---
7+
version: 2
8+
updates:
9+
- package-ecosystem: gomod
10+
directory: "/"
11+
schedule:
12+
interval: daily
13+
open-pull-requests-limit: 10

.github/labels.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
- name: status/possible-priority
2+
description: This issue is ready to work and should be considered as a potential priority
3+
color: F9D0C4
4+
- name: status/prioritized
5+
description: This issue has been triaged and resolving it is a priority
6+
color: BFD4F2
7+
- name: status/blocked
8+
description: This issue has been triaged and resolving it is blocked on some other issue
9+
color: 848978
10+
- name: bug
11+
description: Something isn't working
12+
color: d73a4a
13+
- name: enhancement
14+
description: A new feature or request
15+
color: a2eeef
16+
- name: documentation
17+
description: This issue relates to writing documentation
18+
color: D4C5F9
19+
- name: help wanted
20+
description: Extra attention is needed
21+
color: 008672
22+
- name: semver:major
23+
description: A change requiring a major version bump
24+
color: 6b230e
25+
- name: semver:minor
26+
description: A change requiring a minor version bump
27+
color: cc6749
28+
- name: semver:patch
29+
description: A change requiring a patch version bump
30+
color: f9d0c4
31+
- name: good first issue
32+
description: A good first issue to get started with
33+
color: d3fc03
34+
- name: "failure:release"
35+
description: An issue filed automatically when a release workflow run fails
36+
color: f00a0a
37+
- name: "failure:push"
38+
description: An issue filed automatically when a push buildpackage workflow run fails
39+
color: f00a0a
40+
- name: "failure:update-builder-toml"
41+
description: An issue filed automatically when a builder.toml update workflow run fails
42+
color: f00a0a
43+
- name: "failure:update-github-config"
44+
description: An issue filed automatically when a github config update workflow run fails
45+
color: f00a0a
46+
- name: "failure:approve-bot-pr"
47+
description: An issue filed automatically when a PR auto-approve workflow run fails
48+
color: f00a0a

.github/release-drafter-config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Config for https://github.com/release-drafter/release-drafter
2+
name-template: '$RESOLVED_VERSION'
3+
tag-template: 'v$RESOLVED_VERSION'
4+
filter-by-commitish: true
5+
commitish: main
6+
7+
change-template: '- $TITLE [#$NUMBER] by [@$AUTHOR](https://github.com/$AUTHOR)'
8+
template: |
9+
## Full Changelog
10+
11+
Following pull requests got merged for this release:
12+
13+
$CHANGES
14+
15+
version-resolver:
16+
major:
17+
labels:
18+
- 'semver:major'
19+
minor:
20+
labels:
21+
- 'semver:minor'
22+
patch:
23+
labels:
24+
- 'semver:patch'
25+
default: patch
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Approve Bot PRs and Enable Auto-Merge
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Test Pull Request"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
download:
11+
name: Download PR Artifact
12+
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
13+
runs-on: ubuntu-24.04
14+
outputs:
15+
pr-author: ${{ steps.pr-data.outputs.author }}
16+
pr-number: ${{ steps.pr-data.outputs.number }}
17+
steps:
18+
- name: 'Download artifact'
19+
uses: paketo-buildpacks/github-config/actions/pull-request/download-artifact@main
20+
with:
21+
name: "event-payload"
22+
repo: ${{ github.repository }}
23+
run_id: ${{ github.event.workflow_run.id }}
24+
workspace: "/github/workspace"
25+
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
26+
- id: pr-data
27+
run: |
28+
echo "author=$(jq -r '.pull_request.user.login' event.json)" >> "$GITHUB_OUTPUT"
29+
echo "number=$(jq -r '.pull_request.number' event.json)" >> "$GITHUB_OUTPUT"
30+
31+
approve:
32+
name: Approve Bot PRs
33+
needs: download
34+
if: ${{ needs.download.outputs.pr-author == 'paketo-bot' || needs.download.outputs.pr-author == 'dependabot[bot]' }}
35+
runs-on: ubuntu-24.04
36+
steps:
37+
- name: Check Commit Verification
38+
id: unverified-commits
39+
uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main
40+
with:
41+
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }}
42+
repo: ${{ github.repository }}
43+
number: ${{ needs.download.outputs.pr-number }}
44+
45+
- name: Check for Human Commits
46+
id: human-commits
47+
uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main
48+
with:
49+
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }}
50+
repo: ${{ github.repository }}
51+
number: ${{ needs.download.outputs.pr-number }}
52+
53+
- name: Checkout
54+
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
55+
uses: actions/checkout@v5
56+
57+
- name: Approve
58+
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
59+
uses: paketo-buildpacks/github-config/actions/pull-request/approve@main
60+
with:
61+
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }}
62+
number: ${{ needs.download.outputs.pr-number }}
63+
64+
- name: Enable Auto-Merge
65+
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
66+
run: |
67+
gh pr merge ${{ needs.download.outputs.pr-number }} --auto --rebase
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)