-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6ecab7d
Showing
29 changed files
with
1,146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name-template: "v$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
version-template: "$MAJOR.$MINOR.$PATCH" | ||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
minor: | ||
labels: | ||
- "minor" | ||
- "enhancement" | ||
patch: | ||
labels: | ||
- "auto-update" | ||
- "patch" | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- "hotfix" | ||
default: "minor" | ||
|
||
categories: | ||
- title: "🚀 Enhancements" | ||
labels: | ||
- "enhancement" | ||
- "patch" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- "hotfix" | ||
- title: "🤖 Automatic Updates" | ||
labels: | ||
- "auto-update" | ||
|
||
exclude-labels: | ||
- "bot/skip-changelog" | ||
|
||
change-template: | | ||
<details> | ||
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary> | ||
$BODY | ||
</details> | ||
template: | | ||
$CHANGES | ||
replacers: | ||
# Remove irrelevant information from Renovate bot | ||
- search: '/---\s+^#.*Renovate configuration(?:.|\n)*?This PR has been generated .*/gm' | ||
replace: "" | ||
# Remove Renovate bot banner image | ||
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm' | ||
replace: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ | ||
"minor", | ||
"patch" | ||
], | ||
"matchCurrentVersion": "!/^0/", | ||
"automerge": true | ||
}, | ||
{ | ||
"matchDatasources": [ | ||
"go", | ||
"docker" | ||
], | ||
"groupName": "kubernetes", | ||
"groupSlug": "kubernetes", | ||
"matchPackagePatterns": [ | ||
"^k8s.io/" | ||
], | ||
"matchPackageNames": [ | ||
"bitnami/kubectl" | ||
] | ||
}, | ||
{ | ||
"matchManagers": [ | ||
"dockerfile" | ||
], | ||
"matchUpdateTypes": [ | ||
"pin", | ||
"digest" | ||
], | ||
"automerge": true | ||
}, | ||
{ | ||
"matchPackagePatterns": [ | ||
"^golang.*" | ||
], | ||
"groupName": "golang", | ||
"groupSlug": "golang" | ||
} | ||
], | ||
"regexManagers": [ | ||
{ | ||
"fileMatch": [ | ||
".*.go$" | ||
], | ||
"matchStrings": [ | ||
"\"(?<currentValue>.*)\" \/\/ renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s" | ||
], | ||
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" | ||
}, | ||
{ | ||
"fileMatch": [ | ||
"^.github/workflows/.*" | ||
], | ||
"matchStrings": [ | ||
"go-version: (?<currentValue>.*?).x\n" | ||
], | ||
"depNameTemplate": "golang", | ||
"datasourceTemplate": "docker" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: docs | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- docs/** | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup pages | ||
uses: actions/configure-pages@v3 | ||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- name: setup cache | ||
run: | | ||
echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- name: handle cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: install mkdocs material | ||
run: | | ||
pip install mkdocs-material | ||
- name: run mkdocs material | ||
run: | | ||
mkdocs build | ||
- name: upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: public/ | ||
- name: deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: golangci-lint | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: auto-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- .github/** | ||
- docs/** | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
publish: true | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: goreleaser | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*.*.*" | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: actions/checkout@v3 | ||
if: github.event_name == 'push' | ||
with: | ||
fetch-depth: 0 | ||
- name: setup-go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
- name: setup qemu | ||
id: qemu | ||
uses: docker/setup-qemu-action@v2 | ||
- name: setup docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: install cosign | ||
uses: sigstore/cosign-installer@main | ||
with: | ||
cosign-release: "v2.0.1" | ||
- name: setup cosign | ||
run: | | ||
echo "${COSIGN_KEY}" > "$GITHUB_WORKSPACE/cosign.key" | ||
env: | ||
COSIGN_KEY: ${{ secrets.COSIGN_KEY }} | ||
- name: set goreleaser default args | ||
if: startsWith(github.ref, 'refs/tags/') == true | ||
run: | | ||
echo "GORELEASER_ARGS=" >> $GITHUB_ENV | ||
- name: set goreleaser args for branch | ||
if: startsWith(github.ref, 'refs/tags/') == false | ||
run: | | ||
echo "GORELEASER_ARGS=--snapshot" >> $GITHUB_ENV | ||
- name: set goreleaser args renovate | ||
if: startsWith(github.ref, 'refs/heads/renovate') == true | ||
run: | | ||
echo "GORELEASER_ARGS=--snapshot --skip-publish" >> $GITHUB_ENV | ||
- name: run goreleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist ${{ env.GORELEASER_ARGS }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
- name: push docker images (for branches) | ||
if: github.ref == 'refs/heads/main' || github.event.pull_request.base.ref == 'main' | ||
run: | | ||
docker images --format "{{.Repository}}:{{.Tag}}" | grep "ekristen/go-project-template" | xargs -L1 docker push | ||
- name: upload artifacts | ||
if: github.event.pull_request.base.ref == 'main' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: releases/*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
- name: download go mods | ||
run: | | ||
go mod download | ||
- name: run go tests | ||
run: | | ||
go test -timeout 60s -run ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea/ | ||
dist/ | ||
public/ | ||
.env* | ||
*.key |
Oops, something went wrong.