Skip to content
Merged
17 changes: 17 additions & 0 deletions .github/issue-clean-sandbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# title

An example issue created using content from [example-content/output.md](https://github.com/peter-evans/create-issue-from-file/blob/main/example-content/output.md)

## subtitle

Some text

- bullet points
- bullet points

"quoted string"

```python
s = "syntax highlighting"
print(s)
```
17 changes: 17 additions & 0 deletions .github/issue-spawn-latest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# title

An example issue created using content from [example-content/output.md](https://github.com/peter-evans/create-issue-from-file/blob/main/example-content/output.md)

## subtitle

Some text

- bullet points
- bullet points

"quoted string"

```python
s = "syntax highlighting"
print(s)
```
17 changes: 17 additions & 0 deletions .github/issue-spawn-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# title

An example issue created using content from [example-content/output.md](https://github.com/peter-evans/create-issue-from-file/blob/main/example-content/output.md)

## subtitle

Some text

- bullet points
- bullet points

"quoted string"

```python
s = "syntax highlighting"
print(s)
```
28 changes: 28 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"[#] ci/cd":
- '.github/*'
- '.github/**/*'

"[#] deps":
- 'go.mod'
- 'go.sum'

"[#] doc":
- '*.md'
- 'doc/*'
- 'doc/**/*'
- 'examples/**/*'

"[#] cloud":
- 'cdk.json'
- 'cloud/*'
- 'cloud/**/*'

"[#] core":
- '*.go'

"[#] rest api":
- 'http/*'
- 'http/**/*'
- 'cmd/lambda/*'
- 'cmd/lambda/**/*'

154 changes: 154 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
##
## Inspired by Same GitHub Labels
## https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63
##
## [T] - Type prefix
## [P] - Priority prefix
## [@] - State prefix
## [A] - Automation prefix
## [#] - package / category prefix
##
## How To Use
## npm install -g github-label-sync
## github-label-sync --access-token xxxxxx --labels .github/labels.yml fogfish/blueprint-serverless-golang
##

##
## [T] Type labels
- name: "[T] bug"
color: "ee0701"
aliases: []
description: the bug report

- name: "[T] epic"
color: "fbca04"
aliases: []
description: the epic

- name: "[T] feature"
color: "7057ff"
aliases: []
description: the feature, enabler epic or other tech activity

- name: "[T] security"
color: "cc317c"
aliases: []
description: security issues or concerns within the software

- name: "[T] resilience"
color: "660033"
aliases: []
description: resilience concerns within the software

- name: "[T] user story"
color: "fef2c0"
aliases: []
description: user story

- name: "[T] enabler"
color: "7c5d91"
aliases: []
description: enabler activities

##
## [P] Priority labels
- name: "[P] critical"
color: "b30408"
aliases: []
description: critical issue, immediate fix is required

- name: "[P] high"
color: "f4AA3e"
aliases: []
description: high priority issue

- name: "[P] medium"
color: "31689e"
aliases: []
description: medium priority issue

- name: "[P] low"
color: "0a9203"
aliases: []
description: low priority issue

- name: "[P] release"
color: "ed7655"
aliases: []
description: required by upcoming release

##
## [@] State labels
- name: "[@] blocked"
color: "be1910"
aliases: []
description: progress is blocked by other issue

- name: "[@] help wanted"
color: "128a0c"
aliases: []
description: team or community help is wanted on the issue

- name: "[@] on hold"
color: "f9d0c4"
aliases: []
description: development is on hold until further notice

- name: "[@] wontfix"
color: "e2e4e8"
aliases: []
description: the issue would not be resolved due to the reason

- name: "[@] review"
color: "006666"
aliases: []
description: the issue is under the review

- name: "[@] require feedback"
color: "333399"
aliases: []
description: the feedback from author is required

##
## [A] Automation labels
- name: "[A] deploy"
color: "ffccf1"
aliases: []
description: request GitHub Action to deploy

##
## [#] Package / Category labels
- name: "[#] ci/cd"
color: "3978e1"
aliases: []
description: changes to CI/CD configuration

- name: "[#] deps"
color: "3978e1"
aliases: []
description: changes to package dependencies

- name: "[#] doc"
color: "3978e1"
aliases: []
description: changes to documentation

- name: "[#] cloud"
color: "3978e1"
aliases: []
description: changes to cloud infrastructure and its configuration

- name: "[#] core"
color: "3978e1"
aliases: []
description: changes to core business logic

- name: "[#] rest api"
color: "3978e1"
aliases: []
description: changes to public restful api





40 changes: 18 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,31 @@ on:
- /refs/heads/main

jobs:
it:

cloud:
strategy:
matrix:
stack: [blueprint-golang]

runs-on: ubuntu-latest
steps:

##
## setup environment
- name: golang
uses: actions/setup-go@v2
- uses: actions/checkout@v2

- uses: peter-evans/create-issue-from-file@v4
id: spawn-latest
with:
go-version: 1.18
title: Spawn `${{ matrix.stack }}` latest commit to cloud
content-filepath: ./.github/issue-spawn-latest.md

- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18

- name: go get tools
run: |
npm install -g aws-cdk

- name: go build
run: |
go build -v ./...

- name: go test
run: |
go test -v -coverprofile=profile.cov $(go list ./... | grep -v /examples/)
env:
GOPATH: /home/runner/work/${{ github.event.repository.name }}/go

- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

##
## deploys application to aws
- name: aws access
Expand All @@ -65,3 +55,9 @@ jobs:
run: |
echo ::set-output name=target::$(jq -r '.["${{ matrix.stack }}-latest"] | to_entries | .[] | select(.key|test("GatewayEndpoint.*")) | .value ' < $GITHUB_WORKSPACE/stack.json)

- uses: peter-evans/close-issue@v2
with:
issue-number: ${{ steps.spawn-latest.outputs.issue-number }}
comment: |
Latest version of **${{ matrix.stack }}** is deployed to cloud environment:
- **url**: ${{ steps.discover.outputs.target }}
28 changes: 17 additions & 11 deletions .github/workflows/carry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,26 @@ jobs:
strategy:
matrix:
stack: [blueprint-golang]

runs-on: ubuntu-latest
steps:

##
## setup environment
- name: golang
uses: actions/setup-go@v2
- uses: actions/checkout@v2

- uses: peter-evans/create-issue-from-file@v4
id: spawn-release
with:
go-version: 1.18
title: Spawn `${{ matrix.stack }}` release ${{ github.event.release.name }} to cloud
content-filepath: ./.github/issue-spawn-release.md

- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18

##
## fetch deps
- name: go get tools
run: |
npm install -g aws-cdk

##
## deploys application to aws
- name: aws access
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -51,3 +50,10 @@ jobs:
run: |
echo ::set-output name=target::$(jq -r '.["${{ matrix.stack }}-${{ github.event.release.name }}"] | to_entries | .[] | select(.key|test("GatewayEndpoint.*")) | .value ' < $GITHUB_WORKSPACE/stack.json)

- uses: peter-evans/close-issue@v2
with:
issue-number: ${{ steps.spawn-release.outputs.issue-number }}
comment: |
Release ${{ github.event.release.name }} of **${{ matrix.stack }}** is deployed to cloud environment:
- **url**: ${{ steps.discover.outputs.target }}

Loading