Skip to content

Commit

Permalink
use github actions (#17)
Browse files Browse the repository at this point in the history
* use github actions

* rebuild readme
  • Loading branch information
osterman authored Jul 1, 2020
1 parent 5776e20 commit 710eda5
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 113 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "docker"
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
release:
types:
- created
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v2
- name: "Build and push docker image to DockerHub"
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ github.repository }}
registry: registry-1.docker.io
tag_with_ref: true
tag_with_sha: true
48 changes: 48 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'go'

on:
release:
types: [published]

pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repo
- name: 'Checkout'
uses: actions/checkout@v1
# Build Go binaries
- name: 'Build Go binaries'
uses: cloudposse/actions/go/[email protected]
env:
GO111MODULE: on
# Architectures to build for
GOX_OSARCH: >-
windows/386
windows/amd64
freebsd/arm
netbsd/386
netbsd/amd64
netbsd/arm
linux/s390x
linux/arm
darwin/386
darwin/amd64
linux/386
linux/amd64
freebsd/amd64
freebsd/386
openbsd/386
openbsd/amd64
OUTPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_*

# Attach Go binaries to GitHub Release
- name: 'Attach artifacts to GitHub Release'
if: ${{ github.event_name == 'release' }}
uses: cloudposse/actions/github/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_*
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.11.2 as builder
RUN mkdir -p /go/src/github.com/cloudposse/github-commenter
WORKDIR /go/src/github.com/cloudposse/github-commenter
COPY . .
RUN go get && CGO_ENABLED=0 go build -v -o "./dist/bin/github-commenter" *.go
FROM golang:1.13.3-buster as builder
ENV GO111MODULE=on
ENV CGO_ENABLED=0
WORKDIR /usr/src/
COPY . /usr/src
RUN go build -v -o "bin/github-commenter" *.go


FROM alpine:3.8
FROM alpine:3.12
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/cloudposse/github-commenter/dist/bin/github-commenter /usr/bin/github-commenter
COPY --from=builder /usr/src/bin/* /usr/bin/
ENV PATH $PATH:/usr/bin
ENTRYPOINT ["github-commenter"]
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ export DOCKER_TAG ?= latest
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
export DOCKER_BUILD_FLAGS =

PATH:=$(PATH):$(GOPATH)/bin

include $(shell curl --silent -o .build-harness "https://raw.githubusercontent.com/cloudposse/build-harness/master/templates/Makefile.build-harness"; echo .build-harness)


.PHONY : go-get
go-get:
go get


.PHONY : go-build
go-build: go-get
CGO_ENABLED=0 go build -v -o "./dist/bin/github-commenter" *.go
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
133 changes: 93 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,48 @@
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
<!--
** DO NOT EDIT THIS FILE
**
** This file was automatically generated by the `build-harness`.
** 1) Make all changes to `README.yaml`
** 2) Run `make init` (you only need to do this once)
** 3) Run`make readme` to rebuild this file.
**
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
**
-->
[![README Header][readme_header_img]][readme_header_link]

[![Cloud Posse][logo]](https://cpco.io/homepage)

# github-commenter [![Build Status](https://travis-ci.org/cloudposse/github-commenter.svg?branch=master)](https://travis-ci.org/cloudposse/github-commenter) [![Latest Release](https://img.shields.io/github/release/cloudposse/github-commenter.svg)](https://github.com/cloudposse/github-commenter/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
# github-commenter [![Build Status](https://github.com/cloudposse/github-commenter/workflows/go/badge.svg?branch=master)](https://github.com/cloudposse/github-commenter/actions) [![Docker Status](https://github.com/cloudposse/github-commenter/workflows/docker/badge.svg?branch=master)](https://github.com/cloudposse/github-commenter/actions) [![Latest Release](https://img.shields.io/github/release/cloudposse/github-commenter.svg)](https://github.com/cloudposse/github-commenter/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)


Command line utility for creating GitHub comments on Commits, Pull Request Reviews, Pull Request Files, Issues and Pull Requests.
Expand Down Expand Up @@ -56,6 +95,8 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).

## Usage



__NOTE__: Create a [GitHub token](https://help.github.com/articles/creating-an-access-token-for-command-line-use) with `repo:status` and `public_repo` scopes.

__NOTE__: The utility accepts parameters as command-line arguments or as ENV variables (or any combination of command-line arguments and ENV vars).
Expand Down Expand Up @@ -293,38 +334,51 @@ Check out these related projects.

## Help

**Got a question?**
**Got a question?** We got answers.

File a GitHub [issue](https://github.com/cloudposse/github-commenter/issues), send us an [email][email] or join our [Slack Community][slack].

[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]

## Commercial Support

Work directly with our team of DevOps experts via email, slack, and video conferencing.
## DevOps Accelerator for Startups

We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.

[![E-Mail](https://img.shields.io/badge/[email protected])][email]
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.

- **Questions.** We'll use a Shared Slack channel between your team and ours.
- **Troubleshooting.** We'll help you triage why things aren't working.
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback.
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
- **Build New Terraform Modules.** We'll [develop original modules][module_development] to provision infrastructure.
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
- **Implementation.** We'll provide hands-on support to implement our reference architectures.
[![Learn More](https://img.shields.io/badge/learn%20more-success.svg?style=for-the-badge)][commercial_support]

Work directly with our team of DevOps experts via email, slack, and video conferencing.

We deliver 10x the value for a fraction of the cost of a full-time engineer. Our track record is not even funny. If you want things done right and you need it done FAST, then we're your best bet.

- **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code.
- **Release Engineering.** You'll have end-to-end CI/CD with unlimited staging environments.
- **Site Reliability Engineering.** You'll have total visibility into your apps and microservices.
- **Security Baseline.** You'll have built-in governance with accountability and audit logs for all changes.
- **GitOps.** You'll be able to operate your infrastructure via Pull Requests.
- **Training.** You'll receive hands-on training so your team can operate what we build.
- **Questions.** You'll have a direct line of communication between our teams via a Shared Slack channel.
- **Troubleshooting.** You'll get help to triage when things aren't working.
- **Code Reviews.** You'll receive constructive feedback on Pull Requests.
- **Bug Fixes.** We'll rapidly work with you to fix any bugs in our projects.

## Slack Community

Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.

## Discourse Forums

Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.

## Newsletter

Signup for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.

## Office Hours

[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!

[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]

## Contributing

Expand All @@ -349,7 +403,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)



Expand Down Expand Up @@ -420,33 +474,32 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
[goruha_avatar]: http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144




[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]

[logo]: https://cloudposse.com/logo-300x69.svg
[docs]: https://cpco.io/docs
[website]: https://cpco.io/homepage
[github]: https://cpco.io/github
[jobs]: https://cpco.io/jobs
[hire]: https://cpco.io/hire
[slack]: https://cpco.io/slack
[linkedin]: https://cpco.io/linkedin
[twitter]: https://cpco.io/twitter
[testimonial]: https://cpco.io/leave-testimonial
[newsletter]: https://cpco.io/newsletter
[email]: https://cpco.io/email
[commercial_support]: https://cpco.io/commercial-support
[we_love_open_source]: https://cpco.io/we-love-open-source
[module_development]: https://cpco.io/module-development
[terraform_modules]: https://cpco.io/terraform-modules
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/github-commenter
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/github-commenter
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/github-commenter
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/github-commenter
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/github-commenter
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/github-commenter
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=docs
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=website
[github]: https://cpco.io/github?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=github
[jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=jobs
[hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=hire
[slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=slack
[linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=linkedin
[twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=twitter
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=testimonial
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=office_hours
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=newsletter
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=discourse
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=email
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=commercial_support
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=we_love_open_source
[terraform_modules]: https://cpco.io/terraform-modules?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=terraform_modules
[readme_header_img]: https://cloudposse.com/readme/header/img
[readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=readme_header_link
[readme_footer_img]: https://cloudposse.com/readme/footer/img
[readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=readme_footer_link
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-commenter&utm_content=readme_commercial_support_link
[share_twitter]: https://twitter.com/intent/tweet/?text=github-commenter&url=https://github.com/cloudposse/github-commenter
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=github-commenter&url=https://github.com/cloudposse/github-commenter
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/github-commenter
Expand Down
7 changes: 5 additions & 2 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ github_repo: cloudposse/github-commenter
# Badges to display
badges:
- name: "Build Status"
image: "https://travis-ci.org/cloudposse/github-commenter.svg?branch=master"
url: "https://travis-ci.org/cloudposse/github-commenter"
image: "https://github.com/cloudposse/github-commenter/workflows/go/badge.svg?branch=master"
url: "https://github.com/cloudposse/github-commenter/actions"
- name: "Docker Status"
image: "https://github.com/cloudposse/github-commenter/workflows/docker/badge.svg?branch=master"
url: "https://github.com/cloudposse/github-commenter/actions"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/github-commenter.svg"
url: "https://github.com/cloudposse/github-commenter/releases/latest"
Expand Down
5 changes: 0 additions & 5 deletions glide.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module github.com/cloudposse/github-commenter

go 1.13

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.9 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1 // indirect
golang.org/x/net v0.0.0-20200625001655-4c5254603344
gopkg.in/yaml.v2 v2.3.0 // indirect
)
Loading

0 comments on commit 710eda5

Please sign in to comment.