Skip to content

Commit

Permalink
chore(ci): implement release and Terraform CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciekLeks committed Sep 26, 2024
1 parent 90f82a6 commit 2ca4bae
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
workflow_dispatch:
# push:
# branches:
# - master
# paths:
# - '**/*.tf'
# - '.github/workflows/release.yml'

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
# Skip running release workflow on forks
if: github.repository_owner == 'MaciekLeks'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Release
uses: cycjimmy/[email protected]
with:
semantic_version: 19.0.5
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Terraform Modules CI

on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.8.0

- name: Run a Terraform init
run: terraform init

- name: Run a Terraform validate
run: terraform validate

- name: Run a Terraform fmt -check
run: terraform fmt -check

- uses: terraform-linters/setup-tflint@v3
name: Setup TFLint

- name: Run TFLint
run: tflint

0 comments on commit 2ca4bae

Please sign in to comment.