Skip to content

Commit

Permalink
feat: add .github for CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Jul 2, 2024
1 parent c845e63 commit 0bb37c6
Show file tree
Hide file tree
Showing 6 changed files with 502 additions and 696 deletions.
15 changes: 15 additions & 0 deletions .github/auto_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
reviewers:
defaults:
- rollkit
groups:
rollkit:
- team:core
files:
".github/**":
- MSevey
- rollkit
options:
ignore_draft: true
ignored_keywords:
- WIP
number_of_reviewers: 3
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
Please read and fill out this form before submitting your PR.
Please make sure you have reviewed our contributors guide before submitting your
first PR.
NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/
-->

## Overview

<!--
Please provide an explanation of the PR, including the appropriate context,
background, goal, and rationale. If there is an issue with this information,
please provide a tl;dr and link the issue.
Ex: Closes #<issue number>
-->
26 changes: 26 additions & 0 deletions .github/workflows/docker-build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: docker-build-publish

# Trigger on all push events, new semantic version tags, and all PRs
on:
push:
branches:
- "main"
- "v[0-9].[0-9].x"
- "v[0-9].[0-9][0-9].x"
- "v[0-9].x"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
pull_request:

jobs:
docker-build:
permissions:
contents: write
packages: write
uses: rollkit/.github/.github/workflows/[email protected]
with:
dockerfile: Dockerfile
secrets: inherit
66 changes: 66 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Housekeeping

on:
issues:
types: [opened]
pull_request_target:
types: [opened, ready_for_review]

jobs:
issue-management:
if: ${{ github.event.issue }}
name: Add issues to project and add triage label
uses: rollkit/.github/.github/workflows/[email protected]
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-labels: true
labels-to-add: "needs-triage"
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7

add-pr-to-project:
# ignore dependabot PRs
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Add PRs to project
uses: rollkit/.github/.github/workflows/[email protected]
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7

auto-add-reviewer:
name: Auto add reviewer to PR
if: github.event.pull_request
uses: rollkit/.github/.github/workflows/[email protected]
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-auto-request-review: true

auto-add-assignee:
# ignore dependabot PRs
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Assign issue and PR to creator
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Set pull_request url and creator login
# yamllint disable rule:line-length
run: |
echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
# yamllint enable rule:line-length
- name: Assign PR to creator
run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Semantic Pull Request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: conventional-commit-pr-title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 0bb37c6

Please sign in to comment.