-
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 8fac659
Showing
159 changed files
with
9,583 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,19 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.go] | ||
indent_style = tab | ||
|
||
[*.{md,yaml,yml,tmpl}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
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,55 @@ | ||
--- | ||
name: Bug | ||
description: File a bug/issue | ||
labels: ["type: bug", "status: triage"] | ||
assignees: | ||
- michenriksen | ||
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: true | ||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: A concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- 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: true | ||
- type: textarea | ||
attributes: | ||
label: Environment | ||
description: Paste output of the `tmpl --version` command. | ||
value: | | ||
tmpl: | ||
Version: ... | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Anything else? | ||
description: | | ||
Links? References? Anything that will give 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 |
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,9 @@ | ||
--- | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 🛟 Help & Support | ||
url: https://github.com/michenriksen/tmpl/discussions/categories/q-a | ||
about: Please ask and answer questions here. | ||
- name: 💡 Feature Requests & Ideas | ||
url: https://github.com/michenriksen/tmpl/discussions/categories/ideas | ||
about: Please add feature requests and ideas here. |
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,78 @@ | ||
--- | ||
name: docs:deploy | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "docs/**/*" | ||
- "mkdocs.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
container: | ||
image: node:20-alpine | ||
env: | ||
TERM: xterm-256color | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
apk add --no-cache bash wget ncurses | ||
npm install -g markdownlint-cli | ||
wget https://github.com/errata-ai/vale/releases/download/v2.30.0/vale_2.30.0_Linux_64-bit.tar.gz | ||
tar -xvzf vale_2.30.0_Linux_64-bit.tar.gz -C /usr/local/bin | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Vale sync | ||
run: vale sync | ||
- name: Lint | ||
run: ./scripts/lint-docs.sh | ||
|
||
deploy: | ||
needs: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
- name: Set up build cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: mkdocs-tmpl-${{ hashfiles('.cache/**') }} | ||
path: .cache | ||
restore-keys: mkdocs-tmpl- | ||
- name: Install Python dependencies | ||
run: | | ||
pip install mkdocs-material mkdocs-markdownextradata-plugin | ||
- name: Build documentation | ||
run: mkdocs build --clean | ||
- name: Fix permissions | ||
run: | | ||
chmod -c -R +rX "site/" | while read -r line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- name: Upload to GitHub Pages | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: site | ||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v3 | ||
- name: Save build cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
key: mkdocs-tmpl-${{ hashfiles('.cache/**') }} | ||
path: .cache |
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,54 @@ | ||
--- | ||
name: go:verify | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "go.mod" | ||
- "**/*.go" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "go.mod" | ||
- "**/*.go" | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
env: | ||
TERM: xterm-256color | ||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
cache-dependency-path: "go.sum" | ||
go-version: "1.21.4" | ||
- name: Vet | ||
run: go vet ./... | ||
- name: Tidy | ||
run: | | ||
go mod tidy | ||
if ! git diff --exit-code --quiet; then | ||
echo "go mod is not tidy" | ||
exit 1 | ||
fi | ||
- name: Verify dependencies | ||
run: go mod verify | ||
- name: Test | ||
run: ./scripts/test.sh | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 |
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: release | ||
permissions: | ||
contents: write | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Release version (e.g., v1.0.0)" | ||
required: true | ||
jobs: | ||
run: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
container: | ||
image: goreleaser/goreleaser:latest | ||
steps: | ||
- name: Install dependencies | ||
run: apk add --no-cache bash ncurses git | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: | | ||
git config --global --add safe.directory "$PWD" | ||
git fetch --force --tags | ||
- name: Create release tag | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Michael Henriksen" | ||
git tag -a "$VERSION" -m "$VERSION" | ||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
- run: echo "GO_VERSION=$(go env GOVERSION)" >> "$GITHUB_ENV" | ||
- name: Run GoReleaser | ||
run: goreleaser release --clean | ||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Notify Go proxy about new release | ||
run: go list -m "github.com/michenriksen/tmpl@${VERSION}" || true | ||
env: | ||
GOPROXY: proxy.golang.org | ||
VERSION: ${{ github.event.inputs.version }} |
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,41 @@ | ||
--- | ||
name: schema:verify | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "config.schema.json" | ||
- ".tmpl.reference.yaml" | ||
- ".tmpl.example.yaml" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "config.schema.json" | ||
- ".tmpl.reference.yaml" | ||
- ".tmpl.example.yaml" | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
env: | ||
TERM: xterm-256color | ||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
cache-dependency-path: "go.sum" | ||
go-version: "1.21.4" | ||
- name: Lint | ||
run: ./scripts/lint-schema.sh |
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,39 @@ | ||
--- | ||
name: yaml:verify | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "**/*.yml" | ||
- "**/*.yaml" | ||
- ".yamllint" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "**/*.yml" | ||
- "**/*.yaml" | ||
- ".yamllint" | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
verify: | ||
name: verify | ||
runs-on: ubuntu-latest | ||
container: | ||
image: pipelinecomponents/yamllint:amd64-0.29.0 | ||
env: | ||
TERM: xterm-256color | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- name: Install dependencies | ||
run: apk add --no-cache bash ncurses | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Lint | ||
run: ./scripts/lint-yaml.sh |
Oops, something went wrong.