Skip to content

Commit 23a7632

Browse files
committed
chore: merge v1 branch into master
1 parent bcb814c commit 23a7632

File tree

399 files changed

+2538
-20583
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+2538
-20583
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Description of the changes
2+
3+
_In this section, explain **what and why** not how._
4+
5+
_In most cases, you can leave out details about how a change has been made. Code is generally self-explanatory in this regard (and if the code is so complex that it needs to be explained in prose, that’s what source comments are for). Just focus on making clear the reasons why you made the change in the first place, the way things worked before the change (and what was wrong with that), the way they work now, and why you decided to solve it the way you did._

.github/scripts/app-diff.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: "commits-checks"
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
commits-checks:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: "Check out the repository"
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0 # Fetch all history for all tags and branches
16+
17+
- name: "Check commit messages"
18+
uses: docker://aevea/commitsar

.github/workflows/linters.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/modules-linters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# order to be easily maintained across modules. Because of this, please make sure you're not introducing any breaking
77
# changes when modifying this workflow.
88

9-
name: "Linters"
9+
name: "modules-linters"
1010

1111
on:
1212
workflow_call:

.github/workflows/modules-release-please.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
# order to be easily maintained across modules. Because of this, please make sure you're not introducing any breaking
66
# changes when modifying this workflow.
77

8-
name: "Release Modules"
8+
name: "modules-release-please"
99

1010
on:
1111
workflow_call:
1212

1313
jobs:
1414
release-please:
15-
runs-on: "ubuntu-latest"
15+
runs-on: ubuntu-latest
1616
steps:
17-
- uses: "google-github-actions/release-please-action@v3"
17+
- uses: google-github-actions/release-please-action@v3
1818
with:
19-
release-type: "simple"
19+
release-type: simple
20+
pull-request-title-pattern: "chore: release ${version}"
2021
bump-minor-pre-major: true
2122
extra-files: |
2223
variables.tf

.github/workflows/modules-terraform-docs.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# order to be easily maintained across modules. Because of this, please make sure you're not introducing any breaking
77
# changes when modifying this workflow.
88

9-
name: "Terraform Docs"
9+
name: "modules-terraform-docs"
1010

1111
on:
1212
workflow_call:
@@ -17,6 +17,11 @@ on:
1717
required: false
1818
default: ""
1919

20+
env:
21+
ARGS: "--hide-empty=true --sort=false" # Do not show empty sections and do not sort items
22+
DOCS_TPL: "// BEGIN_TF_DOCS\n{{ .Content }}\n// END_TF_DOCS" # Define template compatible with AsciiDoc
23+
TABLES_TPL: "// BEGIN_TF_TABLES\n{{ .Content }}\n// END_TF_TABLES" # Define template compatible with AsciiDoc
24+
2025
jobs:
2126
terraform-docs:
2227
runs-on: ubuntu-latest
@@ -35,8 +40,8 @@ jobs:
3540
output-format: asciidoc document
3641
output-file: README.adoc
3742
output-method: inject
38-
template: "// BEGIN_TF_DOCS\n{{ .Content }}\n// END_TF_DOCS" # Define template compatible with AsciiDoc
39-
args: "--hide-empty=true" # Do not show empty sections
43+
template: ${{ env.DOCS_TPL }}
44+
args: ${{ env.ARGS }}
4045
git-push: false
4146

4247
- name: "Generate Terraform tables"
@@ -47,8 +52,8 @@ jobs:
4752
output-format: asciidoc table
4853
output-file: README.adoc
4954
output-method: inject
50-
template: "// BEGIN_TF_TABLES\n{{ .Content }}\n// END_TF_TABLES" # Define template compatible with AsciiDoc
51-
args: "--hide-empty=true" # Do not show empty sections
55+
template: ${{ env.TABLES_TPL }}
56+
args: ${{ env.ARGS }}
5257
git-push: false
5358

5459
- name: "Generate Terraform docs for the variants"
@@ -60,8 +65,8 @@ jobs:
6065
output-format: asciidoc document
6166
output-file: README.adoc
6267
output-method: inject
63-
template: "// BEGIN_TF_DOCS\n{{ .Content }}\n// END_TF_DOCS" # Define template compatible with AsciiDoc
64-
args: "--hide-empty=true" # Do not show empty sections
68+
template: ${{ env.DOCS_TPL }}
69+
args: ${{ env.ARGS }}
6570
git-push: false
6671

6772
- name: "Generate Terraform tables for the variants"
@@ -73,15 +78,14 @@ jobs:
7378
output-format: asciidoc table
7479
output-file: README.adoc
7580
output-method: inject
76-
template: "// BEGIN_TF_TABLES\n{{ .Content }}\n// END_TF_TABLES" # Define template compatible with AsciiDoc
77-
args: "--hide-empty=true" # Do not show empty sections
81+
template: ${{ env.TABLES_TPL }}
82+
args: ${{ env.ARGS }}
7883
git-push: false
7984

8085
# This step comes after long hours of debugging permission errors on the workflow when trying to do a commit after
8186
# executing the terraform-docs actions. See https://github.com/terraform-docs/gh-actions/issues/90
8287
- name: "Correct ownership of files in preparation for the next step"
83-
run: |
84-
sudo chown runner:docker -Rv .git
88+
run: sudo chown runner:docker -Rv .git
8589

8690
# This step avoids a commit for each previous step and instead commits everything on a single commit
8791
- name: "Commit changes done in the previous steps"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: "pr-issues-project"
3+
4+
on:
5+
workflow_call:
6+
7+
# issues:
8+
# types:
9+
# - opened
10+
# - reopened
11+
12+
# pull_request:
13+
# types:
14+
# - opened
15+
# - reopened
16+
17+
jobs:
18+
add-to-project:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/[email protected]
22+
with:
23+
project-url: https://github.com/orgs/camptocamp/projects/3/
24+
github-token: ${{ secrets.APP_TOKEN}}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: "publish-antora-docs"
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- "docs/**"
8+
9+
workflow_call:
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
publish:
15+
name: "Publish Antora documentation"
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: "Check out repository"
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0 # Fetch all branches and tags
24+
25+
- name: "Build documentation with Antora"
26+
uses: docker://ghcr.io/camptocamp/devops-stack-antora:v3
27+
with:
28+
args: generate antora-playbook.yml --to-dir public/docs
29+
30+
- name: "Upload generated artifact"
31+
if: github.event_name == 'pull_request'
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: documentation
35+
path: ${{ github.workspace }}/public/docs
36+
37+
- name: "Deploy documentation to GitHub Pages"
38+
if: github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
39+
uses: JamesIves/[email protected]
40+
with:
41+
branch: gh-pages
42+
folder: public/docs
43+
target-folder: docs
44+
commit-message: "ci: publish documentation for ${{ github.sha }}"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: "publish-website"
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- "website/**"
8+
9+
push:
10+
branches:
11+
- "main"
12+
paths:
13+
- "website/**"
14+
15+
workflow_dispatch:
16+
17+
jobs:
18+
publish-website:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: "Check out the repository"
23+
uses: actions/checkout@v3
24+
with:
25+
submodules: true # Fetch Hugo theme
26+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
27+
28+
- name: "Setup Hugo"
29+
uses: peaceiris/actions-hugo@v2
30+
with:
31+
hugo-version: "0.92.2"
32+
extended: true
33+
34+
- name: "Build website with Hugo"
35+
run: hugo --minify --source 'website' --destination '../public'
36+
37+
- name: "Upload generated artifact"
38+
if: github.event_name == 'pull_request'
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: website
42+
path: "${{ github.workspace }}/public"
43+
44+
- name: "Deploy website to GitHub Pages"
45+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref_name == 'main'
46+
uses: JamesIves/[email protected]
47+
with:
48+
branch: gh-pages
49+
folder: public
50+
commit-message: "ci: publish website for ${{ github.sha }}"
51+
clean-exclude: |
52+
docs

0 commit comments

Comments
 (0)