Skip to content

Commit

Permalink
Merge pull request #2 from cloudposse-terraform-components/DEV-1548/c…
Browse files Browse the repository at this point in the history
…omponent-requirements

feat(DEV-1548): Required Workflows
  • Loading branch information
milldr authored Feb 14, 2024
2 parents a6ceaa2 + 5ae416c commit dab3c2b
Show file tree
Hide file tree
Showing 15 changed files with 347 additions and 65 deletions.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## what

- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
- Use bullet points to be concise and to the point.

## why

- Provide the justifications for the changes (e.g. business case).
- Describe why these changes were made (e.g. why do these commits fix the problem?)
- Use bullet points to be concise and to the point.

## references

- Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
- Use `closes #123`, if this PR closes a GitHub issue `#123`
- Use `closes JIRA-123`, if this PR closes a Jira Issue `JIRA-123` where `JIRA` is the project abbreviation.
53 changes: 53 additions & 0 deletions .github/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
version-template: '$MAJOR.$MINOR.$PATCH'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
- 'enhancement'
patch:
labels:
- 'auto-update'
- 'patch'
- 'fix'
- 'bugfix'
- 'bug'
- 'hotfix'
default: 'minor'

categories:
- title: '🚀 Enhancements'
labels:
- 'enhancement'
- 'patch'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'hotfix'
- title: '🤖 Automatic Updates'
labels:
- 'auto-update'

change-template: |
<details>
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary>
$BODY
</details>
template: |
$CHANGES
replacers:
# Remove irrelevant information from Renovate bot
- search: '/(?<=---\s)\s*^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
replace: ''
# Remove Renovate bot banner image
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
replace: ''
53 changes: 53 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: gomod
directory: /
labels:
- dependencies
- go
- no-release
schedule:
interval: weekly
day: sunday
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- package-ecosystem: github-actions
open-pull-requests-limit: 3
directory: /
labels:
- dependencies
- github-actions
- no-release
groups:
cicd:
patterns:
- "*"
schedule:
interval: weekly
day: sunday
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- package-ecosystem: npm
open-pull-requests-limit: 3
directory: /website
labels:
- dependencies
- javascript
- no-release
groups:
website:
patterns:
- "*"
schedule:
interval: weekly
day: sunday
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
16 changes: 16 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
docs:
- docs/**
- README.*

automation:
- .gitattributes
- .github/**
- .gitignore
- .pre-commit-config.yaml
- .tflint.hcl
- Makefile
- _typos.toml

configuration:
- src/**
- test/**
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"prConcurrentLimit": 5,
"extends": [
"config:base"
]
}
17 changes: 17 additions & 0 deletions .github/workflows/main-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🚀 Main Branch

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Draft new release
uses: cloudposse/github-action-auto-release@v1
with:
prerelease: false
publish: true
config-name: auto-release.yml
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 🚀 Release

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Generate SemVer versions
uses: cloudposse/github-action-major-release-tagger@v1

- name: Publish release branches
uses: cloudposse/github-action-release-branch-manager@v1
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# TODO, figure out remote template
# export CLOUDPOSSE_TERRAFORM_COMPONENTS_PATH ?= "https://raw.githubusercontent.com/cloudposse-terraform-components/.github/main"
# export README_TEMPLATE_FILE ?= $(CLOUDPOSSE_TERRAFORM_COMPONENTS_PATH)/templates/README.md.gotmpl
export README_DEPS ?= src/README.md

-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)

all: init readme

readme: readme/build

test::
@echo "🚀 Starting tests..."
./test/run.sh
@echo "✅ All tests passed."
Loading

0 comments on commit dab3c2b

Please sign in to comment.