Skip to content

Commit

Permalink
Sync github (#140)
Browse files Browse the repository at this point in the history
* Sync github

* sync
  • Loading branch information
max-lobur authored May 17, 2023
1 parent 55aaadb commit c1a4477
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 251 deletions.
23 changes: 20 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
#
# Order is important: the last matching pattern has the highest precedence

# This module is used everywhere and changes must be carefully vetted,
# so only allow cloudposse Admins to approve PRs.
* @cloudposse/admins
# These owners will be the default owners for everything
* @cloudposse/engineering @cloudposse/contributors

# Cloud Posse must review any changes to Makefiles
**/Makefile @cloudposse/engineering
**/Makefile.* @cloudposse/engineering

# Cloud Posse must review any changes to GitHub actions
.github/* @cloudposse/engineering

# Cloud Posse must review any changes to standard context definition,
# but some changes can be rubber-stamped.
**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers

# Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration
.github/mergify.yml @cloudposse/admins
.github/CODEOWNERS @cloudposse/admins
2 changes: 1 addition & 1 deletion .github/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ version-resolver:
- 'bugfix'
- 'bug'
- 'hotfix'
- 'no-release'
default: 'minor'
filter-by-commitish: true

categories:
- title: '🚀 Enhancements'
Expand Down
61 changes: 61 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# https://docs.mergify.io/conditions.html
# https://docs.mergify.io/actions.html
pull_request_rules:
- name: "approve automated PRs that have passed checks"
conditions:
- "base=main"
- "-closed"
- "head~=^(auto-update|renovate)/.*"
- "check-success=terraform-module / ci"
- "and: *common_checks"
- "sender-permission>=write"
actions:
review:
type: "APPROVE"
bot_account: "cloudposse-mergebot"
message: "We've automatically approved this PR because the checks from the automated Pull Request have passed."

- name: "merge automated PRs when approved and tests pass"
conditions:
- "base=main"
- "-closed"
- "head~=^(auto-update|renovate)/.*"
- "check-success=terraform-module / ci"
- "and: *common_checks"
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "#commented-reviews-by=0"
- "sender-permission>=write"
actions:
merge:
method: "squash"

- name: "delete the head branch after merge"
conditions:
- "merged"
actions:
delete_head_branch: {}

- name: "ask to resolve conflict"
conditions:
- "conflict"
- "-closed"
actions:
comment:
message: "This pull request has conflicts, please resolve."

- name: "remove outdated reviews"
conditions:
- "base=main"
actions:
dismiss_reviews:
changes_requested: true
approved: true
message: "This Pull Request has been updated, so we're dismissing all reviews."

- name: "close PRs with no files changed"
conditions:
- "#files=0"
actions:
close:
message: "This pull request has been automatically closed by Mergify because there are no longer any changes."
16 changes: 15 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{
"enabled": false
"extends": [
"config:base",
":preserveSemverRanges"
],
"labels": ["auto-update"],
"dependencyDashboardAutoclose": true,
"enabledManagers": ["terraform"],
"terraform": {
"ignorePaths": ["**/context.tf", "examples/**"]
},
"postUpgradeTasks": {
"commands": ["make readme"],
"fileFilters": ["README.md"],
"executionMode": "update"
}
}
88 changes: 0 additions & 88 deletions .github/workflows/auto-format.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/auto-readme.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/auto-release.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/chatops.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/feature-branch-chatops.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: feature-branch-chatops
on:
issue_comment:
types: [created]

permissions:
pull-requests: write
id-token: write
contents: write

jobs:
terraform-module:
uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/feature-branch-chatops.yml@main
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/feature-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: feature-branch
on:
pull_request:
branches:
- main
- release/**
types: [opened, synchronize, reopened, labeled, unlabeled]

permissions:
pull-requests: write
id-token: write
contents: write

jobs:
terraform-module:
uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/feature-branch.yml@pass_repo
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: release-branch
on:
push:
branches:
- main
- release/**
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'

permissions:
contents: write
id-token: write

jobs:
terraform-module:
uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-branch.yml@pass_repo
secrets:
github_access_token: ${{ secrets.REPO_ACCESS_TOKEN }}
Loading

0 comments on commit c1a4477

Please sign in to comment.