Skip to content

Commit 4ff0153

Browse files
authored
Merge pull request #10 from InputObject2/feature/add-cicd
(feature): adding github actions for version and lint
2 parents bbf8503 + e3cc8d3 commit 4ff0153

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Automated Version Bump and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v2
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '14'
20+
21+
- name: Bump Version and Create Release
22+
uses: phips28/gh-action-bump-version@v9
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag-prefix: "v"
27+
skip-tag: false
28+
commit-message: "chore(release): bump version to {{version}} [skip ci]"
29+
30+
- name: Create GitHub Release
31+
uses: softprops/action-gh-release@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
files: |
36+
path/to/your/asset.zip
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Terraform Lint and Format Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
terraform:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Terraform
20+
uses: hashicorp/setup-terraform@v3
21+
with:
22+
terraform_version: 1.9.0
23+
24+
- name: Terraform Format Check
25+
run: terraform fmt -check
26+
27+
- name: Terraform Init
28+
run: terraform init
29+
30+
- name: Terraform Validate
31+
run: terraform validate
32+
33+
- name: Install TFLint
34+
run: |
35+
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
36+
37+
- name: TFLint
38+
run: tflint

0 commit comments

Comments
 (0)