Skip to content

Commit 1b109e3

Browse files
authored
Merge pull request #7 from dunglas/build
Add a build pipeline
2 parents f8ff401 + d68fe7f commit 1b109e3

File tree

14 files changed

+963
-72
lines changed

14 files changed

+963
-72
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, ethnicity, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at dunglas+coc@gmail.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: dunglas

.github/workflows/cd.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: '1.14'
19+
- name: Docker Hub Login
20+
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
21+
env:
22+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
23+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
24+
- name: Release
25+
uses: goreleaser/goreleaser-action@v1
26+
with:
27+
version: latest
28+
args: release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
GO111MODULE: 'on'
9+
10+
jobs:
11+
lint:
12+
name: Lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@master
17+
- name: Lint Go Code
18+
uses: docker://golangci/golangci-lint:latest
19+
with:
20+
args: golangci-lint run ./...

.goreleaser.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
builds:
5+
-
6+
env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- darwin
11+
- windows
12+
goarch:
13+
- 386
14+
- amd64
15+
- arm
16+
- arm64
17+
archives:
18+
-
19+
replacements:
20+
darwin: Darwin
21+
linux: Linux
22+
windows: Windows
23+
386: i386
24+
amd64: x86_64
25+
files:
26+
- COPYRIGHT
27+
- LICENSE
28+
- README.md
29+
- public/*
30+
format_overrides:
31+
- goos: windows
32+
format: zip
33+
checksum:
34+
name_template: 'checksums.txt'
35+
snapshot:
36+
name_template: "{{ .Tag }}-next"
37+
changelog:
38+
sort: asc
39+
filters:
40+
exclude:
41+
- '^docs:'
42+
- '^test:'
43+
dockers:
44+
-
45+
image_templates:
46+
- 'dunglas/uri-template-tester:{{ .Tag }}'
47+
- 'dunglas/uri-template-tester:v{{ .Major }}'
48+
- 'dunglas/uri-template-tester:v{{ .Major }}.{{ .Minor }}'
49+
- 'dunglas/uri-template-tester:latest'
50+
extra_files:
51+
- public/

COPYRIGHT

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Copyright (C) 2019-present Kévin Dunglas
2+
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU Affero General Public License, version 3,
5+
as published by the Free Software Foundation.
6+
7+
This program is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
GNU Affero General Public License for more details.
11+
12+
You should have received a copy of the GNU Affero General Public License
13+
along with this program. If not, see <http://www.gnu.org/licenses/>.
14+
15+
As a special exception, the copyright holders give permission to link the
16+
code of portions of this program with the OpenSSL library under certain
17+
conditions as described in each individual source file and distribute
18+
linked combinations including the program with the OpenSSL library. You
19+
must comply with the GNU Affero General Public License in all respects
20+
for all of the code used other than as permitted herein. If you modify
21+
file(s) with this exception, you may extend this exception to your
22+
version of the file(s), but you are not obligated to do so. If you do not
23+
wish to do so, delete this exception statement from your version. If you
24+
delete this exception statement from all source files in the program,
25+
then also delete it in the license file.
26+
27+
The copyright holders provide the following statement as a clarification
28+
of the conditions of this License. This statement is not a further
29+
restriction. It will be deemed a legal notice allowed under Section 7b,
30+
and must accordingly be preserved in any redistribution of the Program.
31+
This clarification applies to the URI Template Tester licensed hereunder by
32+
Kévin Dunglas. The Corresponding Source of the Program includes any
33+
software that interacts with the Program and contains functionality to
34+
provision or manage the Program for the purpose of enabling third-party
35+
users to interact with the Program remotely through a computer network,
36+
and any such software that is added to or combined with the Program
37+
constitutes modification that produces a work based on the Program.

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM gcr.io/distroless/static
2+
COPY uri-template-tester /
3+
COPY public /public/
4+
CMD ["/uri-template-tester"]
5+
EXPOSE 80 443

0 commit comments

Comments
 (0)