Skip to content

Commit

Permalink
Update actions (#276)
Browse files Browse the repository at this point in the history
* Update actions

* refactor auto-lable

* remove dup

* Update README.md (#278)
  • Loading branch information
osterman authored Nov 20, 2019
1 parent ae26d50 commit 60dd21e
Show file tree
Hide file tree
Showing 15 changed files with 174 additions and 33 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 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/>

* @cloudposse/engineering
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help.

[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)

## Describe the Bug
A clear and concise description of what the bug is.

## Expected Behavior
A clear and concise description of what you expected to happen.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Run '....'
3. Enter '....'
4. See error

## Screenshots
If applicable, add screenshots or logs to help explain your problem.

## Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:
- OS: [e.g. Linux, OSX, WSL, etc]
- Version [e.g. 10.15]

## Additional Context
Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
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.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: 'feature request'
assignees: ''

---

Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) in the `#geodesic` channel or visit our [Slack Archive](https://archive.sweetops.com/geodesic/).

[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)

## Describe the Feature

A clear and concise description of what the bug is.

## Expected Behavior

A clear and concise description of what you expected to happen.

## Use Case

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.

## Describe Ideal Solution

A clear and concise description of what you want to happen. If you don't know, that's okay.

## Alternatives Considered

Explain what alternative solutions or features you've considered.

## Additional Context

Add any other context or screenshots about the feature request here.
Empty file.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 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`

6 changes: 3 additions & 3 deletions .github/auto_assign.yml → .github/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to author to set pr creater as assignee
# Set to author to set PR creator as assignee
addAssignees: author

# A list of reviewers to be added to pull requests (GitHub user name)
# Teams are not supported (wontfix): https://github.com/kentaro-m/auto-assign/issues/39
reviewers:
- aknysh
- osterman
- goruha

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0


3 changes: 0 additions & 3 deletions .github/labeler.yml → .github/auto-label-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ docs:
github:
- .github/**

vendor:
- vendor/**

scripts:
- bin/**
- tasks/**
18 changes: 18 additions & 0 deletions .github/vendor.yml → .github/auto-label.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
codefresh:
- codefresh/**
- codefresh.yml

docker:
- Dockerfile
- apk/Dockerfile.*

docs:
- docs/**

github:
- .github/**

scripts:
- bin/**
- tasks/**
vendor: vendor/**
vendor/assume-role: vendor/assume-role/**
vendor/atlantis: vendor/atlantis/**
vendor/awless: vendor/awless/**
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: 'auto-assign'
on: pull_request
name: auto-assign
on:
pull_request:
types: [opened, reopened]

jobs:
reviewers:
Expand All @@ -8,3 +10,4 @@ jobs:
- uses: cloudposse/actions/github/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/auto-assign.yml'
23 changes: 23 additions & 0 deletions .github/workflows/auto-greet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: auto-greet

on: [pull_request, issues]

jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |-
Thank you for reporting the issue! If you haven't already [joined our slack community](https://slack.sweetops.com), then we invite you to do so.
This is a great place to get help and ask questions from our AMAZING community.
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
pr-message: |-
Thank you for submitting this PR! If you haven't already [joined our slack community](https://slack.sweetops.com), then we invite you to do so.
We receive an overwhelming number of contributions. By joining our slack, we'll be able to review your PR faster.
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
16 changes: 2 additions & 14 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@ name: auto-label
on: [pull_request]

jobs:
autolabel:

components:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'
- uses: actions/checkout@master
- run: "make -C vendor labeler"
- uses: cloudposse/actions/github/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GIT_COMMIT_MESSAGE: "Updated .github/vendor.yml labels"
- uses: actions/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/vendor.yml'
configuration-path: '.github/auto-label.yml'
11 changes: 8 additions & 3 deletions .github/workflows/auto-readme.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: 'auto-readme'

on:
# Open a PR to update README (as necessary)
# Open a PR to update README on merge to master (as necessary)
push:
branches:
- master

# Open a PR to update README for all PRs (as necessary)
pull_request:
types: [opened, synchronize, reopened]

# Update README nightly
schedule:
- cron: '0 0 * * *'
Expand Down Expand Up @@ -34,5 +39,5 @@ jobs:
PULL_REQUEST_BODY: |-
This is an auto-generated PR which updates the `README.md` from the `README.yaml`
using the [`cloudposse/build-harness`](https://github.com/cloudposse/build-harness).
PULL_REQUEST_BRANCH: update-readme
PULL_REQUEST_BRANCH: github-actions/auto-readme
BRANCH_SUFFIX: none
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
export DOCKER_BUILD_FLAGS =

export DEFAULT_HELP_TARGET := help/vendor
export README_DEPS ?= vendor/labeler docs/targets.md
export README_DEPS ?= .github/auto-label.yml docs/targets.md

export DIST_CMD ?= cp -a
export DIST_PATH ?= /dist
Expand Down Expand Up @@ -36,8 +36,12 @@ push:
run:
docker run -it ${DOCKER_IMAGE_NAME} sh

vendor/labeler:
$(MAKE) -C vendor labeler
.github/auto-label.yml:: PACKAGES=$(sort $(dir $(wildcard vendor/*/)))
.github/auto-label.yml::
cp .github/auto-label-default.yml $@
for vendor in $(PACKAGES); do \
echo "$${vendor%/}: $${vendor}**"; \
done >> $@

## Build alpine packages for testing
docker/build/apk:
Expand Down
5 changes: 0 additions & 5 deletions vendor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ build: $(PACKAGES)
$(PACKAGES): prepare
make --no-print-directory -C $@ apk

labeler:
for vendor in $(PACKAGES); do \
echo "vendor/$${vendor%/}: vendor/$${vendor}**"; \
done > ../.github/vendor.yml

## Update all packages
auto-update:
find . -mindepth 1 -maxdepth 1 -type d | xargs -I{} bash -c 'make --no-print-directory --quiet --silent -C {} auto-update || exit 255'
Expand Down

0 comments on commit 60dd21e

Please sign in to comment.