-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: sync latest github workflows, settings, scans, and dev tooling (…
…#10) Aligning repo with all default configuration: - add tfplugindocs integration to generate readme on template - pre-commit - devcontainer (optional to use) - default linting initialized in vscode - github actions from standard actions - renovate/mend integration - mage tasks
- Loading branch information
1 parent
3c0ab40
commit 192dcd8
Showing
28 changed files
with
1,242 additions
and
61 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,8 @@ | ||
export DIRENV_WARN_TIMEOUT='10s' | ||
export DIRENV_LOG_FORMAT="" | ||
|
||
source_env "$HOME" | ||
source_env_if_exists ./env/.envrc | ||
export PATH="${GOPATH}/bin:${PATH}" | ||
|
||
export MAGEFILE_ENABLE_COLOR=1 |
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 |
---|---|---|
@@ -1 +1,86 @@ | ||
* text eol=lf | ||
# Prevents issues when working with multiple platforms as developers. | ||
# For more useful information see this great article: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ | ||
# Common settings that generally should always be used with your language specific settings | ||
# CHECK FOR ISSUES: git ls-files --eol | ||
# RESOLVE ISSUES: git add --renormalize . | ||
|
||
# Auto detect text files and perform LF normalization | ||
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ | ||
* text=auto eol=lf | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# | ||
|
||
# Documents | ||
*.bibtex text diff=bibtex | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
*.md text diff=markdown | ||
*.tex text diff=tex | ||
*.adoc text | ||
*.textile text | ||
*.mustache text | ||
*.csv text | ||
*.tab text | ||
*.tsv text | ||
*.txt text | ||
*.sql text | ||
|
||
# Graphics | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.tif binary | ||
*.tiff binary | ||
*.ico binary | ||
# SVG treated as text by default. | ||
*.svg text | ||
# If you want to treat it as binary, | ||
# use the following line instead. | ||
# *.svg binary | ||
*.eps binary | ||
|
||
# Scripts | ||
*.bash text eol=lf | ||
*.fish text eol=lf | ||
*.sh text eol=lf | ||
*.zsh text eol=lf | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
*.ps1 text eol=crlf | ||
|
||
# Serialisation | ||
*.json text | ||
*.toml text | ||
*.xml text | ||
*.yaml text | ||
*.yml text | ||
|
||
# Archives | ||
*.7z binary | ||
*.gz binary | ||
*.tar binary | ||
*.tgz binary | ||
*.zip binary | ||
|
||
# Text files where line endings should be preserved | ||
*.patch -text | ||
|
||
# | ||
# Exclude files from exporting | ||
# | ||
|
||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.gitkeep export-ignore |
Validating CODEOWNERS rules …
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,2 @@ | ||
.github @DelineaXPM/dsv-admins | ||
* @DelineaXPM/dsv-contributors |
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,14 @@ | ||
--- | ||
# Schema: https://github.com/kentaro-m/auto-assign-action | ||
runOnDraft: true | ||
addReviewers: true | ||
addAssignees: author | ||
numberOfReviewers: 0 | ||
reviewers: | ||
reviewGroups: | ||
useReviewGroups: false | ||
# filterLabels: | ||
# exclude: | ||
# - wontmerge | ||
# - wip | ||
# - incomplete pr |
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,25 @@ | ||
--- | ||
name: assign | ||
on: | ||
# pull_request: # For testing changes in branch | ||
pull_request_target: | ||
types: [opened, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
assign: | ||
name: assign | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: read # Because it needs to read the configuration file | ||
steps: | ||
- uses: kentaro-m/auto-assign-action@60730395fd3afb76c7407e16cd4b144fbbcf28a6 # renovate: tag=v1 | ||
with: | ||
configuration-path: .github/auto-assign.yml # Only needed if you use something other than .github/auto_assign.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,44 @@ | ||
--- | ||
name: conventional-commit-pr-title | ||
on: | ||
pull_request_target: | ||
# pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
jobs: | ||
main: | ||
name: conventional-commit-pr-title | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
permissions: | ||
pull-requests: read | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@91682d013dea3ff257520b9b68c9cb93ced4fe9b # renovate: tag=v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
feat | ||
fix | ||
chore | ||
refactor | ||
test | ||
docs | ||
style | ||
perf | ||
ci | ||
build | ||
revert | ||
requireScope: false | ||
subjectPattern: ^(?![A-Z]).+$ | ||
subjectPatternError: | | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
doesn't start with an uppercase character. | ||
ignoreLabels: | | ||
ignore-semantic-pull-request | ||
headerPattern: '^(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$' | ||
headerPatternCorrespondence: type, scope, subject | ||
wip: false # This requires elevated permissions, not using |
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: lint | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
pull-requests: read | ||
contents: read | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
# Automatically caches for performance as well | ||
# https://github.com/reviewdog/action-golangci-lint | ||
- name: golangci-lint | ||
uses: reviewdog/action-golangci-lint@70498f2d1f75a55ee9a4d719e74e21ed68aebea3 # renovate: tag=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,28 @@ | ||
--- | ||
name: stale | ||
on: | ||
schedule: | ||
- cron: 30 1 * * * | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Config Options: https://github.com/actions/stale#list-of-input-options | ||
- uses: actions/stale@532554b8a8498a0e006fbcde824b048728c4178f # renovate: tag=v5 | ||
with: | ||
days-before-stale: 30 | ||
days-before-close: 5 | ||
stale-issue-message: 🤖 This has been flagged as stale. If it is still relevant please post an update with context, otherwise this will shortly be closed. _You can always reopen a closed issue. This is not a permanent delete._ | ||
stale-pr-message: 🤖 This is being marked as stale due to no recent activity. Update to keep this open. | ||
stale-issue-label: stale-issue | ||
exempt-issue-labels: pinned | ||
stale-pr-label: stale-pr | ||
exempt-draft-pr: true |
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,42 @@ | ||
--- | ||
name: test | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# https://github.com/magnetikonline/action-golang-cache | ||
- name: Setup Golang with cache | ||
uses: magnetikonline/action-golang-cache@09043845c4b214830a4ae9eb6f5c61d3d3fd37b0 # renovate: tag=v3 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: mage-tidy | ||
uses: magefile/mage-action@5f7a9a23cfef763949ca41834b868167adbd1b59 # renovate: tag=v2 | ||
with: | ||
version: latest | ||
args: go:tidy | ||
|
||
- name: mage-test | ||
uses: magefile/mage-action@5f7a9a23cfef763949ca41834b868167adbd1b59 # renovate: tag=v2 | ||
with: | ||
version: latest | ||
args: go:testsum ./... | ||
env: | ||
# Race conditions will be hit due to the cli driven tasks and binaries being called. | ||
GOTEST_DISABLE_RACE: 1 |
Oops, something went wrong.