Skip to content

Commit

Permalink
Merge pull request #7 from nlamirault/feat/github-actions
Browse files Browse the repository at this point in the history
Refactoring Github Actions
  • Loading branch information
nlamirault authored May 1, 2021
2 parents 0801707 + 8338b62 commit c6c6bd1
Show file tree
Hide file tree
Showing 16 changed files with 473 additions and 25 deletions.
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 <nicolas.lamirault@gmail.com>
#
# 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'
35 changes: 35 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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 for action/labeler

area/kubernetes:
- kubernetes/*
- kubernetes/**/*

area/gcp:
- iac/gcp/*
- iac/gcp/**/*

area/aws:
- iac/aws/*
- iac/aws/**/*

area/azure:
- iac/azure/*
- iac/azure/**/*

kind/documentation:
- docs/*
- docs/**/*
62 changes: 62 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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:
- 'gcp'
- 'aws'
- 'azure'
- 'kubernetes'

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/kubernetes':
- kubernetes/*
- kubernetes/**/*

'area/gcp':
- iac/gcp/*
- iac/gcp/**/*

'area/aws':
- iac/aws/*
- iac/aws/**/*

'area/azure':
- iac/azure/*
- iac/azure/**/*

'kind/documentation':
- docs/*
- docs/**/*
26 changes: 22 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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:
Expand All @@ -9,12 +24,15 @@ categories:
- 'kind/enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'kind/bug'
- 'fix'
- 'bugfix'
- 'bug'
- 'kind/bug'
- title: '🧰 Maintenance'
label: 'chore'
- title: '🚨 Maintenance'
labels:
- 'area/renovate'
- 'dependency/flux'
- 'chore'
- title: '📝 Documentation'
labels:
- 'kind/documentation'
Expand All @@ -35,6 +53,6 @@ version-resolver:
- 'patch'
default: patch
template: |
## Changes
## 🚧 Changes
$CHANGES
23 changes: 4 additions & 19 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,21 @@
"rebaseWhen": "conflicted",
"assignees": ["@nlamirault"],
"reviewersFromCodeOwners": true,
"labels": ["area/renovate"],
"packageRules": [
// Labels for Terraform
{
"datasources": ["terraform", "terraform-provider", "terraform-module"],
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["major"],
"labels": ["area/renovate", "dependency/terraform", "priority/high", "size/xs"]
},
{
"datasources": ["terraform", "terraform-provider", "terraform-module"],
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["minor"],
"labels": ["area/renovate", "dependency/terraform", "priority/medium", "size/xs"]
},
{
"datasources": ["terraform", "terraform-provider", "terraform-module"],
"updateTypes": ["patch"],
"labels": ["area/renovate", "dependency/terraform", "priority/low", "size/xs"]
},
// Labels for Terraform-version
{
"matchPackageNames": ["terraform-version"],
"updateTypes": ["major"],
"labels": ["area/renovate", "dependency/terraform", "priority/high", "size/xs"]
},
{
"matchPackageNames": ["terraform-version"],
"updateTypes": ["minor"],
"labels": ["area/renovate", "dependency/terraform", "priority/medium", "size/xs"]
},
{
"matchPackageNames": ["terraform-version"],
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["patch"],
"labels": ["area/renovate", "dependency/terraform", "priority/low", "size/xs"]
},
Expand Down
32 changes: 32 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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.

# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
28 changes: 28 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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 / Pre-commit

# on:
# pull_request:
# push:
# branches: [master]

# jobs:
# pre-commit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# - uses: pre-commit/action@v2.0.0
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 <nicolas.lamirault@gmail.com>
#
# 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/prow-github-actions@v1.1.1
# 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/labeler@main
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 <nicolas.lamirault@gmail.com>
#
# 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/prow-github-actions@v1.1.2
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 <nicolas.lamirault@gmail.com>
#
# 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/prow-github-actions@v1.1.2
with:
jobs: 'lgtm'
github-token: "${{ secrets.GITHUB_TOKEN }}"
Loading

0 comments on commit c6c6bd1

Please sign in to comment.