Skip to content

Commit

Permalink
feat(github): Setup Github Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
nlamirault committed Feb 23, 2024
1 parent f3ff0ed commit caf8d43
Show file tree
Hide file tree
Showing 14 changed files with 523 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/dependabot.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/issue_label_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

label-alias:
bug: 'kind/bug'
feature_request: 'kind/feature'
question: 'kind/question'
46 changes: 46 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# labels to be used with /area command
area:
- 'hugo'
- 'docsy'

kind:
- 'documentation'
- 'discussion'
- 'feature'
- 'question'

priority:
- 'low'
- 'medium'
- 'high'
- 'critical'

status:
- available
- blocked
- in_progress
- on_hold

# File globs for PR labeler
# tests:
# - '**/*.test.ts'

'area/hugo':
- content/**/*

'area/docsy':
- themes/docsy/**/*
58 changes: 58 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
# https://gitmoji.carloscuesta.me/
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'kind/feature'
- 'kind/enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'kind/bug'
- 'fix'
- 'bugfix'
- 'bug'
- title: '🚨 Maintenance'
labels:
- 'kind/renovate'
- 'area/renovate'
- 'chore'
- title: '📝 Documentation'
labels:
- 'kind/documentation'
- title: '💡 Question'
labels:
- 'kind/question'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## 🚧 Changes
$CHANGES
39 changes: 39 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extends": [
"config:base",
":gitSignOff"
],
"enabled": true,
"timezone": "Europe/Paris",
"dependencyDashboard": true,
"dependencyDashboardTitle": "Renovate Dashboard",
// "gitAuthor": "Nicolas Lamirault <[email protected]>",
// "commitBody": "Signed-off-by: Nicolas Lamirault <[email protected]>",
// Do not notify on closed unmerged PRs
"suppressNotifications": ["prIgnoreNotification"],
// Do not rebase PRs
"rebaseWhen": "conflicted",
"assignees": ["@nlamirault"],
"reviewersFromCodeOwners": true,
"helm-values": {
"fileMatch": ["kubernetes/.+\\.yaml$"]
},
"labels": ["kind/renovate"],
"packageRules": [
// Setup datasources
// Enable auto-merge docker
// {
// "datasources": ["docker"],
// "automerge": true,
// "requiredStatusChecks": null,
// "updateTypes": ["minor", "patch"],
// },
// Enable auto-merge helm
// {
// "datasources": ["helm"],
// "automerge": true,
// "requiredStatusChecks": null,
// "updateTypes": ["patch"],
// }
]
}
30 changes: 30 additions & 0 deletions .github/workflows/draft-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Project / Draft PR Labels

on:
pull_request:
types: [opened, ready_for_review]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: label swapping
uses: jinmayamashita/[email protected]
with:
in-progress-label: 'status/in_progress'
ready-for-review-label: 'status/review_needed'
repo-token: ${{ secrets.GITHUB_TOKEN }}
76 changes: 76 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Project / Website

on:
push:
branches:
- master

jobs:
build-deploy:
runs-on: ubuntu-latest

# steps:
# - name: Checkout Repo
# uses: actions/checkout@master
# with:
# submodules: true

# - name: Install dependencies
# run: |
# npm install

# - name: Publish Site
# uses: chabad360/hugo-gh-pages@master
# with:
# githubToken: "${{ secrets.GITHUB_TOKEN }}"


steps:
- uses: actions/checkout@v4
with:
submodules: recursive # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.79.1'
extended: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '12.x'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci

- name: Build
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: www.portefaix.xyz
39 changes: 39 additions & 0 deletions .github/workflows/prow-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# name: "Label PRs from globs"
# on:
# schedule:
# - cron: "0 * * * *"

# jobs:
# execute:
# runs-on: ubuntu-latest
# steps:
# - uses: jpmcb/[email protected]
# with:
# jobs: 'pr-labeler'
# github-token: "${{ secrets.GITHUB_TOKEN }}"

name: Prow / Pull Request Labeler
on:
- pull_request_target

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
31 changes: 31 additions & 0 deletions .github/workflows/prow-lgtm-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Prow / Merge on lgtm label
on:
schedule:
- cron: "0 * * * *"

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/[email protected]
with:
jobs: 'lgtm'
github-token: "${{ secrets.GITHUB_TOKEN }}"

# this configuration is optional and will default to 'merge'
# possible options are 'merge', 'rebase', or 'squash'
merge-method: 'squash'
25 changes: 25 additions & 0 deletions .github/workflows/prow-lgtm-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Prow / Run Jobs on PR
on: pull_request

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/[email protected]
with:
jobs: 'lgtm'
github-token: "${{ secrets.GITHUB_TOKEN }}"
Loading

0 comments on commit caf8d43

Please sign in to comment.