Skip to content

Commit 0bb37c6

Browse files
committed
feat: add .github for CI workflows
1 parent c845e63 commit 0bb37c6

File tree

6 files changed

+502
-696
lines changed

6 files changed

+502
-696
lines changed

.github/auto_request_review.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
reviewers:
2+
defaults:
3+
- rollkit
4+
groups:
5+
rollkit:
6+
- team:core
7+
files:
8+
".github/**":
9+
- MSevey
10+
- rollkit
11+
options:
12+
ignore_draft: true
13+
ignored_keywords:
14+
- WIP
15+
number_of_reviewers: 3

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
Please read and fill out this form before submitting your PR.
3+
4+
Please make sure you have reviewed our contributors guide before submitting your
5+
first PR.
6+
7+
NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/
8+
-->
9+
10+
## Overview
11+
12+
<!--
13+
Please provide an explanation of the PR, including the appropriate context,
14+
background, goal, and rationale. If there is an issue with this information,
15+
please provide a tl;dr and link the issue.
16+
17+
Ex: Closes #<issue number>
18+
-->
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: docker-build-publish
2+
3+
# Trigger on all push events, new semantic version tags, and all PRs
4+
on:
5+
push:
6+
branches:
7+
- "main"
8+
- "v[0-9].[0-9].x"
9+
- "v[0-9].[0-9][0-9].x"
10+
- "v[0-9].x"
11+
tags:
12+
- "v[0-9]+.[0-9]+.[0-9]+"
13+
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
14+
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
15+
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
16+
pull_request:
17+
18+
jobs:
19+
docker-build:
20+
permissions:
21+
contents: write
22+
packages: write
23+
uses: rollkit/.github/.github/workflows/[email protected]
24+
with:
25+
dockerfile: Dockerfile
26+
secrets: inherit

.github/workflows/housekeeping.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Housekeeping
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request_target:
7+
types: [opened, ready_for_review]
8+
9+
jobs:
10+
issue-management:
11+
if: ${{ github.event.issue }}
12+
name: Add issues to project and add triage label
13+
uses: rollkit/.github/.github/workflows/[email protected]
14+
secrets: inherit
15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
with:
19+
run-labels: true
20+
labels-to-add: "needs-triage"
21+
run-projects: true
22+
project-url: https://github.com/orgs/rollkit/projects/7
23+
24+
add-pr-to-project:
25+
# ignore dependabot PRs
26+
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
27+
name: Add PRs to project
28+
uses: rollkit/.github/.github/workflows/[email protected]
29+
secrets: inherit
30+
permissions:
31+
issues: write
32+
pull-requests: write
33+
with:
34+
run-projects: true
35+
project-url: https://github.com/orgs/rollkit/projects/7
36+
37+
auto-add-reviewer:
38+
name: Auto add reviewer to PR
39+
if: github.event.pull_request
40+
uses: rollkit/.github/.github/workflows/[email protected]
41+
secrets: inherit
42+
permissions:
43+
issues: write
44+
pull-requests: write
45+
with:
46+
run-auto-request-review: true
47+
48+
auto-add-assignee:
49+
# ignore dependabot PRs
50+
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
51+
name: Assign issue and PR to creator
52+
runs-on: ubuntu-latest
53+
permissions:
54+
issues: write
55+
pull-requests: write
56+
steps:
57+
- name: Set pull_request url and creator login
58+
# yamllint disable rule:line-length
59+
run: |
60+
echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
61+
echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
62+
# yamllint enable rule:line-length
63+
- name: Assign PR to creator
64+
run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }}
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Semantic Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: read
12+
13+
jobs:
14+
main:
15+
name: conventional-commit-pr-title
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v5
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)