mirror of
https://github.com/jimeh/terraform-cloudflare-email.git
synced 2026-02-19 01:46:40 +00:00
Merge pull request #7 from jimeh/add-ci-job
This commit is contained in:
31
.github/release-please-config.json
vendored
Normal file
31
.github/release-please-config.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"packages": {
|
||||||
|
".": {
|
||||||
|
"release-type": "simple",
|
||||||
|
"changelog-path": "CHANGELOG.md",
|
||||||
|
"bump-minor-pre-major": true,
|
||||||
|
"bump-patch-for-minor-pre-major": true,
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": false,
|
||||||
|
"always-update": true,
|
||||||
|
"include-component-in-tag": false,
|
||||||
|
"extra-files": [
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
|
"changelog-sections": [
|
||||||
|
{ "type": "feat", "section": "Features" },
|
||||||
|
{ "type": "fix", "section": "Bug Fixes" },
|
||||||
|
{ "type": "perf", "section": "Performance Improvements" },
|
||||||
|
{ "type": "revert", "section": "Reverts" },
|
||||||
|
{ "type": "docs", "section": "Documentation" },
|
||||||
|
{ "type": "style", "section": "Styles", "hidden": true },
|
||||||
|
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
|
||||||
|
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
|
||||||
|
{ "type": "test", "section": "Tests", "hidden": true },
|
||||||
|
{ "type": "build", "section": "Build System", "hidden": true },
|
||||||
|
{ "type": "ci", "section": "CI", "hidden": true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||||
|
}
|
||||||
49
.github/workflows/ci.yml
vendored
Normal file
49
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
name: CI
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
|
||||||
|
- run: terraform fmt -check -recursive -diff
|
||||||
|
- run: prettier --check README.md
|
||||||
|
|
||||||
|
validate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
|
||||||
|
- run: terraform init -backend=false
|
||||||
|
- run: terraform validate
|
||||||
|
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
|
||||||
|
- run: terraform-docs --output-check .
|
||||||
|
- run: prettier --check README.md
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
|
||||||
|
- run: tflint --init
|
||||||
|
- run: tflint --format compact
|
||||||
|
|
||||||
|
release-please:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/heads/')
|
||||||
|
steps:
|
||||||
|
- uses: jimeh/release-please-manifest-action@84f33fd2828210488c36f3e0a7e3209252d2ae7d # v3.0.0
|
||||||
|
with:
|
||||||
|
target-branch-pattern: "^(main|master)$"
|
||||||
|
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
|
||||||
|
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
|
||||||
16
.github/workflows/release-please.yml
vendored
16
.github/workflows/release-please.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
on: push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-please:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
outputs:
|
|
||||||
release_created: ${{ steps.release-please.outputs.release_created }}
|
|
||||||
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
|
|
||||||
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
|
|
||||||
steps:
|
|
||||||
- uses: google-github-actions/release-please-action@v3
|
|
||||||
id: release-please
|
|
||||||
with:
|
|
||||||
command: manifest
|
|
||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.terraform/
|
||||||
|
.terraform.lock.hcl
|
||||||
@@ -3,3 +3,4 @@
|
|||||||
node = "lts"
|
node = "lts"
|
||||||
terraform = "latest"
|
terraform = "latest"
|
||||||
terraform-docs = "latest"
|
terraform-docs = "latest"
|
||||||
|
tflint = "latest"
|
||||||
|
|||||||
4
.tflint.hcl
Normal file
4
.tflint.hcl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
plugin "terraform" {
|
||||||
|
enabled = true
|
||||||
|
preset = "recommended"
|
||||||
|
}
|
||||||
14
Makefile
14
Makefile
@@ -1,13 +1,23 @@
|
|||||||
.PHONY: docs fmt check
|
.PHONY: docs fmt lint lint-fix check
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
|
rm -f .terraform.lock.hcl
|
||||||
terraform-docs .
|
terraform-docs .
|
||||||
prettier --write README.md
|
prettier --write README.md
|
||||||
|
|
||||||
fmt: docs
|
fmt: docs
|
||||||
terraform fmt -recursive
|
terraform fmt -recursive
|
||||||
|
|
||||||
check:
|
lint:
|
||||||
|
tflint --init
|
||||||
|
tflint --format compact
|
||||||
|
|
||||||
|
lint-fix:
|
||||||
|
tflint --init
|
||||||
|
tflint --fix
|
||||||
|
|
||||||
|
check: lint
|
||||||
|
rm -f .terraform.lock.hcl
|
||||||
terraform-docs --output-check .
|
terraform-docs --output-check .
|
||||||
prettier --check README.md
|
prettier --check README.md
|
||||||
terraform fmt -check -recursive
|
terraform fmt -check -recursive
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ resource "cloudflare_record" "srv" {
|
|||||||
|
|
||||||
| Name | Version |
|
| Name | Version |
|
||||||
|------|---------|
|
|------|---------|
|
||||||
|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.1 |
|
||||||
| <a name="requirement_cloudflare"></a> [cloudflare](#requirement\_cloudflare) | >= 3.0, < 5.0 |
|
| <a name="requirement_cloudflare"></a> [cloudflare](#requirement\_cloudflare) | >= 3.0, < 5.0 |
|
||||||
|
|
||||||
## Providers
|
## Providers
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"packages": {
|
|
||||||
".": {
|
|
||||||
"release-type": "simple",
|
|
||||||
"changelog-path": "CHANGELOG.md",
|
|
||||||
"bump-minor-pre-major": true,
|
|
||||||
"bump-patch-for-minor-pre-major": true,
|
|
||||||
"draft": false,
|
|
||||||
"prerelease": false,
|
|
||||||
"extra-files": [
|
|
||||||
"README.md"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
terraform {
|
terraform {
|
||||||
|
required_version = ">= 1.1"
|
||||||
|
|
||||||
required_providers {
|
required_providers {
|
||||||
cloudflare = {
|
cloudflare = {
|
||||||
source = "cloudflare/cloudflare"
|
source = "cloudflare/cloudflare"
|
||||||
|
|||||||
Reference in New Issue
Block a user