Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit bc35859

Browse files
committed
fix: move to github
1 parent 95c5efb commit bc35859

File tree

13 files changed

+857
-1
lines changed

13 files changed

+857
-1
lines changed

.github/release-drafter.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# Format and labels used aim to match those used by Ansible project
3+
name-template: '$RESOLVED_VERSION'
4+
tag-template: '$RESOLVED_VERSION'
5+
categories:
6+
- title: 'Major Changes'
7+
labels:
8+
- 'major' # c6476b
9+
- title: 'Minor Changes'
10+
labels:
11+
- 'feature' # 006b75
12+
- 'enhancement' # ededed
13+
- 'refactoring'
14+
- title: 'Bugfixes'
15+
labels:
16+
- 'bug' # fbca04
17+
- title: 'Deprecations'
18+
labels:
19+
- 'deprecated' # fef2c0
20+
exclude-labels:
21+
- 'skip-changelog'
22+
- 'duplicate'
23+
version-resolver:
24+
major:
25+
labels:
26+
- 'major'
27+
minor:
28+
labels:
29+
- 'minor'
30+
- 'feature'
31+
- 'enhancement'
32+
- 'refactoring'
33+
patch:
34+
labels:
35+
- 'patch'
36+
- 'bug'
37+
- 'deprecated'
38+
default: patch
39+
autolabeler:
40+
- label: 'skip-changelog'
41+
title: '/chore/i'
42+
- label: 'bug'
43+
title: '/fix/i'
44+
- label: 'enhancement'
45+
title: '/(enhance|improve)/i'
46+
- label: 'feature'
47+
title: '/feature/i'
48+
- label: 'dreprecated'
49+
title: '/deprecat/i'
50+
template: |
51+
$CHANGES
52+
Kudos goes to: $CONTRIBUTORS

.github/workflows/prettier-md.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# https://github.com/creyD/prettier_action
3+
name: Prettier markdown files
4+
5+
on:
6+
push:
7+
paths:
8+
- '**.md'
9+
10+
jobs:
11+
prettier-md:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 1
14+
15+
steps:
16+
- name: Git checkout
17+
uses: actions/checkout@v2
18+
with:
19+
ref: ${{ github.head_ref }}
20+
21+
- name: Prettify code
22+
uses: creyD/prettier_action@v3.1
23+
with:
24+
prettier_options: --write {**/*,*}.md

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: New release
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
generate_changelog:
12+
runs-on: ubuntu-latest
13+
name: create release draft
14+
steps:
15+
- uses: actions/checkout@v2.3.4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: 'Get Previous tag'
20+
id: previoustag
21+
uses: "WyriHaximus/github-action-get-previous-tag@master"
22+
env:
23+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
24+
25+
- name: calculate next version
26+
id: version
27+
uses: patrickjahns/version-drafter-action@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Generate changelog
32+
uses: charmixer/auto-changelog-action@v1
33+
with:
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
future_release: ${{ steps.version.outputs.next-version }}
36+
37+
- name: Generate readme
38+
uses: terraform-docs/gh-actions@main
39+
with:
40+
working-dir: .
41+
output-file: README.md
42+
output-method: inject
43+
44+
- name: push changelog and readme
45+
uses: github-actions-x/commit@v2.6
46+
with:
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
push-branch: 'main'
49+
commit-message: 'update changelog'
50+
force-add: 'true'
51+
files: CHANGELOG.md README.md
52+
name: T-Systems MMS
53+
email: frage@t-systems-mms.com
54+
55+
# do a second checkout to prevent race situation
56+
# changelog gets updated but action works on old commit id
57+
- uses: actions/checkout@v2.3.4
58+
with:
59+
ref: main
60+
61+
- name: Generate changelog for the release
62+
run: |
63+
sed '/## \[${{ steps.previoustag.outputs.tag }}\]/Q' CHANGELOG.md > CHANGELOGRELEASE.md
64+
- name: Read CHANGELOG.md
65+
id: package
66+
uses: juliangruber/read-file-action@v1
67+
with:
68+
path: ./CHANGELOGRELEASE.md
69+
70+
- name: Create Release draft
71+
id: create_release
72+
uses: actions/create-release@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
75+
with:
76+
release_name: ${{ steps.version.outputs.next-version }}
77+
tag_name: ${{ steps.version.outputs.next-version }}
78+
body: |
79+
${{ steps.package.outputs.content }}
80+
draft: true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Terraform Lint
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
terraform-lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Important: This sets up your GITHUB_WORKSPACE environment variable
12+
- uses: actions/checkout@v2
13+
- name: Lint Terraform
14+
# replace "master" with any valid ref
15+
uses: actionshub/terraform-lint@main

.terraform-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
formatter: template
2+
3+
sections:
4+
show:
5+
- header
6+
- requirements
7+
- providers
8+
- resources
9+
- modules
10+
- inputs
11+
- outputs
12+
- footer
13+
14+
content: |-
15+
{{ .Header }}
16+
17+
<-- This file is autogenerated, please do not change. -->
18+
19+
{{ .Requirements }}
20+
21+
{{ .Providers }}
22+
23+
{{ .Resources }}
24+
25+
{{ .Inputs }}
26+
27+
{{ .Outputs }}
28+
29+
## Examples
30+
31+
```hcl
32+
{{ include "examples/main.tf" }}
33+
```
34+
35+
sort:
36+
enabled: true
37+
by: required
38+
39+
settings:
40+
indent: 2
41+
hide-empty: true
42+
anchor: false
43+
escape: false
44+
required: true
45+
type: true
46+
read-comments: true

0 commit comments

Comments
 (0)