-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cloudposse/github-workflows
GitHub Workflows Initial Setup
- Loading branch information
Showing
19 changed files
with
812 additions
and
1 deletion.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use this file to define individuals or teams that are responsible for code in a repository. | ||
# Read more: <https://help.github.com/articles/about-codeowners/> | ||
# | ||
# Order is important: the last matching pattern has the highest precedence | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
name: Bug report | ||
description: Create a report to help us improve | ||
labels: ["bug"] | ||
assignees: [""] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Found a bug? | ||
Please checkout our [Slack Community](https://slack.cloudposse.com) | ||
or visit our [Slack Archive](https://archive.sweetops.com/). | ||
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) | ||
- type: textarea | ||
id: concise-description | ||
attributes: | ||
label: Describe the Bug | ||
description: A clear and concise description of what the bug is. | ||
placeholder: What is the bug about? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear and concise description of what you expected. | ||
placeholder: What happened? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction-steps | ||
attributes: | ||
label: Steps to Reproduce | ||
description: Steps to reproduce the behavior. | ||
placeholder: How do we reproduce it? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots | ||
description: If applicable, add screenshots or logs to help explain. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Environment | ||
description: Anything that will help us triage the bug. | ||
placeholder: | | ||
- OS: [e.g. Linux, OSX, WSL, etc] | ||
- Version [e.g. 10.15] | ||
- Module version | ||
- Terraform version | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Context | ||
description: | | ||
Add any other context about the problem here. | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
blank_issues_enabled: false | ||
|
||
contact_links: | ||
|
||
- name: Community Slack Team | ||
url: https://cloudposse.com/slack/ | ||
about: |- | ||
Please ask and answer questions here. | ||
- name: Office Hours | ||
url: https://cloudposse.com/office-hours/ | ||
about: |- | ||
Join us every Wednesday for FREE Office Hours (lunch & learn). | ||
- name: DevOps Accelerator Program | ||
url: https://cloudposse.com/accelerate/ | ||
about: |- | ||
Own your infrastructure in record time. We build it. You drive it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
name: Feature Request | ||
description: Suggest an idea for this project | ||
labels: ["feature request"] | ||
assignees: [""] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Have a question? | ||
Please checkout our [Slack Community](https://slack.cloudposse.com) | ||
or visit our [Slack Archive](https://archive.sweetops.com/). | ||
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) | ||
- type: textarea | ||
id: concise-description | ||
attributes: | ||
label: Describe the Feature | ||
description: A clear and concise description of what the feature is. | ||
placeholder: What is the feature about? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear and concise description of what you expected. | ||
placeholder: What happened? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: use-case | ||
attributes: | ||
label: Use Case | ||
description: | | ||
Is your feature request related to a problem/challenge you are trying | ||
to solve? | ||
Please provide some additional context of why this feature or | ||
capability will be valuable. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: ideal-solution | ||
attributes: | ||
label: Describe Ideal Solution | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives-considered | ||
attributes: | ||
label: Alternatives Considered | ||
description: Explain alternative solutions or features considered. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Context | ||
description: | | ||
Add any other context about the problem here. | ||
validations: | ||
required: false |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## 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` | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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' | ||
- 'no-release' | ||
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: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: "auto-readme" | ||
on: | ||
workflow_dispatch: {} | ||
|
||
## Added pull_request to register workflow from the PR. | ||
## Read more https://stackoverflow.com/questions/63362126/github-actions-how-to-run-a-workflow-created-on-a-non-master-branch-from-the-wo | ||
pull_request: | ||
branches-ignore: ['*'] | ||
|
||
schedule: | ||
# Example of job definition: | ||
# .---------------- minute (0 - 59) | ||
# | .------------- hour (0 - 23) | ||
# | | .---------- day of month (1 - 31) | ||
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | ||
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | ||
# | | | | | | ||
# * * * * * user-name command to be executed | ||
|
||
# Update README.md nightly at 4am UTC | ||
- cron: '0 4 * * *' | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Find default branch name | ||
id: defaultBranch | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
run: | | ||
default_branch=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name) | ||
printf "::set-output name=defaultBranch::%s\n" "${default_branch}" | ||
printf "defaultBranchRef.name=%s\n" "${default_branch}" | ||
- name: Update readme | ||
shell: bash | ||
id: update | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
DEF: "${{ steps.defaultBranch.outputs.defaultBranch }}" | ||
run: | | ||
make init | ||
make readme/build | ||
# Ignore changes if they are only whitespace | ||
if ! git diff --quiet README.md && git diff --ignore-all-space --ignore-blank-lines --quiet README.md; then | ||
git restore README.md | ||
echo Ignoring whitespace-only changes in README | ||
fi | ||
- name: Create Pull Request | ||
# This action will not create or change a pull request if there are no changes to make. | ||
# If a PR of the auto-update/readme branch is open, this action will just update it, not create a new PR. | ||
uses: cloudposse/actions/github/[email protected] | ||
with: | ||
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} | ||
commit-message: Update README.md and docs | ||
title: Update README.md and docs | ||
body: |- | ||
## what | ||
This is an auto-generated PR that updates the README.md and docs | ||
## why | ||
To have most recent changes of README.md and doc from origin templates | ||
branch: auto-update/readme | ||
base: ${{ steps.defaultBranch.outputs.defaultBranch }} | ||
delete-branch: true | ||
labels: | | ||
auto-update | ||
no-release | ||
readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Feature branch | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
perform: | ||
uses: cloudposse/github-actions-workflows-github-action-composite/.github/workflows/feature-branch.yml@main | ||
with: | ||
organization: "${{ github.event.repository.owner.login }}" | ||
repository: "${{ github.event.repository.name }}" | ||
ref: "${{ github.event.pull_request.head.ref }}" | ||
secrets: | ||
github-private-actions-pat: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Integration Tests" | ||
|
||
on: | ||
workflow_dispatch: {} | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
AWS_REGION: us-east-2 | ||
|
||
# Permissions required for assuming AWS identity | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Plan Atmos Component | ||
uses: ./ | ||
with: | ||
component: "foobar" | ||
stack: "plat-ue2-sandbox" | ||
component-path: "components/terraform/foobar" | ||
terraform-plan-role: ${{ secrets.TERRAFORM_PLAN_ROLE }} | ||
terraform-state-role: ${{ secrets.TERRAFORM_STATE_ROLE }} | ||
terraform-state-bucket: ${{ secrets.TERRAFORM_STATE_BUCKET }} | ||
terraform-state-table: ${{ secrets.TERRAFORM_STATE_TABLE }} | ||
aws-region: ${{ env.AWS_REGION }} |
Oops, something went wrong.