Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasklinger1234 committed Dec 20, 2021
0 parents commit 404c4fd
Show file tree
Hide file tree
Showing 28 changed files with 1,032 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.envrc
.git
.gitignore
docker-compose.yml
Dockerfile
Jenkinsfile
README.md
vendor/
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 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/>

* @thomasklinger1234
* @AljoschaDembowsky2909
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐞 Bug
description: File a bug report
title: "[BUG] <title>"
labels: [bug]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 🆕 Feature
description: Request a new feature
title: "[FEATURE] <title>"
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the feature you are requesting.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Feature description
description: A concise description of what you're expecting.
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: "13:00"
timezone: Europe/Berlin
open-pull-requests-limit: 20
44 changes: 44 additions & 0 deletions .github/workflows/Default_Nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# ATTENTION: This is a generic release workflow and not tied specifically to this repository.
name: Default_Nightly

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs: {}

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_USERNAME: ${{ github.actor }}

jobs:
delete_artifacts:
runs-on: ubuntu-latest
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 7days

stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in 5 days if no further activity occurs. Thank you
for your contributions.
days-before-pr-stale: 45
days-before-pr-close: 5
exempt-pr-labels: 'pinned,security'
only-issue-labels: 'pending-response'
days-before-issue-stale: 30
days-before-issue-close: 7
stale-issue-message: >
This issue has been automatically marked as stale because it has been open for 30 days
with no response from the author. It will be closed in next 7 days if no further
activity occurs from the issue author.
close-issue-message: >
This issue has been closed because it has not received response from the issue author.
39 changes: 39 additions & 0 deletions .github/workflows/Default_PR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# ATTENTION: This is a generic release workflow and not tied specifically to this repository.
name: Default_PR

on:
pull_request:
branches: [ main ]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
# Welcome ${{github.actor}} :tada:
Congrats to your first issue!
![](https://camo.githubusercontent.com/f08021a3c40652e932c61ab2b4a004f3a57b8ff7/687474703a2f2f7261636b2e322e6d736863646e2e636f6d2f6d656469612f5a676b794d44457a4c7a41344c7a41314c7a59794c32467559326876636d3168626934324e6a4a6b5953356e6157594b63416c306148567459676b344e5442344f4455775067706c435770775a772f65333664313462642f3163302f616e63686f726d616e2e6a7067)
pr-message: |
# Welcome ${{github.actor}} :tada:
Congrats to your first PR!
![giphy 2](https://cloud.githubusercontent.com/assets/395397/14451851/3abad496-003f-11e6-9a35-1ba112d981d7.gif)
pre_commit:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

detect_inappropriate_language:
runs-on: ubuntu-latest
steps:
- uses: theashraf/alex-action@master
28 changes: 28 additions & 0 deletions .github/workflows/My_CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: My_CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- run: make verify
- run: make build
- run: make test

golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
54 changes: 54 additions & 0 deletions .github/workflows/My_Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: My_Release

on:
push:
tags:
- 'v*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
publish-docker-image:
name: Publish Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{github.sha}},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{github.ref_name}}
labels: ${{ steps.meta.outputs.labels }}

publish-release:
name: Publish GitHub release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Build && release binaries
uses: docker://goreleaser/goreleaser:v0.179.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
cmd/traefik-config-validator/traefik-config-validator
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
output:
format: line-number

linters:
disable-all: true
enable:
- bodyclose
- deadcode
- errcheck
- gofmt
- goimports
- gosimple
- govet
- goheader
- ineffassign
- staticcheck
- typecheck
- unused
- varcheck

linters-settings:
goimports:
local-prefixes: "github.com/otto-de/traefik-config-validator"
goheader:
template-path: hack/boilerplate.go.txt
values:
const:
AUTHOR: OTTO GmbH & Co KG
25 changes: 25 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
builds:
- binary: traefik-config-validator
main: ./cmd/traefik-config-validator
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
before:
hooks:
- go mod download
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
files:
- none*
changelog:
sort: asc
filters:
exclude:
- Merge pull request
checksum:
name_template: 'checksums.txt'
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/golangci/golangci-lint
rev: v1.43.0
hooks:
- id: golangci-lint
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
golang 1.17
Loading

0 comments on commit 404c4fd

Please sign in to comment.