Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Hoß committed Oct 8, 2022
0 parents commit 8eca430
Show file tree
Hide file tree
Showing 1,862 changed files with 1,097,848 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

# top-most EditorConfig file
root = true

# global rules for all fies
[*]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

# Makefiles use tabs by convention
[Makefile]
indent_style = tab
[*.mk]
indent_style = tab
24 changes: 24 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.css text
*.spec text
*.rb text
*.java text
*.js text
*.md text
*.properties text
*.txt text
*.yml text
*.yaml text
*.html text
*.xml text
*.rc text
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

blank_issues_enabled: true
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
assignees:
- sebhoss
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
assignees:
- sebhoss
34 changes: 34 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: CodeQL
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: 42 3 * * 5
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ go ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: Automated Release
on:
schedule:
- cron: 23 3 * * MON
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: commits
name: Count Commits
run: echo "::set-output name=count::$(git rev-list --count HEAD --since='last Monday' -- internal)"
- id: release
name: Create Release Version
if: steps.commits.outputs.count > 0
run: echo "::set-output name=version::$(date +'%Y.%-m.%-d')"
- id: tag
name: Create Release Tag
if: steps.commits.outputs.count > 0
uses: EndBug/latest-tag@latest
with:
ref: ${{ steps.release.outputs.version }}
- id: setup_go
name: Set up Go
uses: actions/setup-go@v3
if: steps.commits.outputs.count > 0
with:
go-version-file: go.mod
cache: true
- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
if: steps.commits.outputs.count > 0
with:
gpg_private_key: ${{ secrets.GPG_SECRET_KEY_BASE64 }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
- id: goreleaser
name: Run GoReleaser
uses: goreleaser/[email protected]
if: steps.commits.outputs.count > 0
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: REUSE compliance
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
94 changes: 94 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: Verify Commits
on:
push:
branches: [ main ]
paths:
- .github/workflows/verify.yml
- go.mod
- go.sum
- main.go
- docs/**
- examples/**
- internal/**
- templates/**
- terratest/**
- tools/**
pull_request:
branches: [ main ]
paths:
- .github/workflows/verify.yml
- go.mod
- go.sum
- main.go
- docs/**
- examples/**
- internal/**
- templates/**
- terratest/**
- tools/**
jobs:
build:
name: Build Project
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- id: setup_go
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- id: lint
name: Lint Go Code
uses: golangci/golangci-lint-action@v3
with:
version: latest
- id: generate_docs
name: Generate Documentation
run: go generate
- id: verify_docs
name: Verify Documentation
run: |
git diff --compact-summary --exit-code || \
(echo "*** Unexpected differences after code generation. Run 'make docs' and commit."; exit 1)
- id: build
name: Build Provider
run: go build -v ./...
terratest:
name: Terratest Tests with TF ${{ matrix.terraform }}
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
terraform:
- 1.0.*
- 1.1.*
- 1.2.*
- 1.3.*
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- id: setup_go
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- id: setup_terraform
name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- id: terratest
name: Run Terratest Tests
run: make terratests
Loading

0 comments on commit 8eca430

Please sign in to comment.