Skip to content

Commit

Permalink
ci: update WF versions and add dependabot config file (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetOps authored Jan 24, 2024
1 parent 7eb8f78 commit d2bb9a8
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 23 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "chore"
- package-ecosystem: "terraform"
directory: "/"
schedule:
interval: "weekly"
labels:
- "chore"
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

Expand All @@ -17,6 +17,7 @@ jobs:
working-dir: ./examples/basic/
git-push: "false"
output-file: README.md
config-file: ./examples/basic/.terraform-docs.yml

- name: Render terraform docs inside the README.md
uses: terraform-docs/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Auto Label
runs-on: ubuntu-latest
steps:
- uses: fuxingloh/[email protected].2
- uses: fuxingloh/[email protected].3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/labeler.yml
3 changes: 1 addition & 2 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Sync labels
on:
push:
branches:
- master
- main

jobs:
Expand All @@ -12,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Sync labels
uses: micnncim/[email protected]
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,37 @@ name: PR title conformance

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
lint-pr:
runs-on: ubuntu-latest

steps:
- name: Lint PR
uses: aslafy-z/[email protected]
uses: amannn/action-semantic-pull-request@v5
with:
preset: conventional-changelog-angular@^5.0.6
types: |
build
ci
docs
feat
fix
perf
refactor
style
test
chore
requireScope: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment for PR title conformance
if: failure()
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{tojson(github.event.number)}}
body: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Release Drafter
on:
push:
branches:
- master
- main

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.0
terraform_version: 1.6.6

- name: Ensure Terraform code is formated
run: terraform fmt -check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.0
terraform_version: 1.6.6

- name: Terraform Init
run: terraform init
Expand All @@ -25,5 +25,5 @@ jobs:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: "true"
filter_mode: "nofilter"
filter_mode: "diff_context"
flags: "--module"
8 changes: 4 additions & 4 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.0
terraform_version: 1.6.6

- name: Terraform Init
run: terraform init
Expand All @@ -25,6 +25,6 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
filter_mode: nofilter
filter_mode: diff_context
fail_on_error: true
tfsec_flags: "--exclude-downloaded-modules"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module "aweasome_module" {

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
## Providers

No providers.
Expand Down
4 changes: 3 additions & 1 deletion examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |

## Providers

Expand Down
3 changes: 3 additions & 0 deletions examples/basic/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 1.3"
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"
}

0 comments on commit d2bb9a8

Please sign in to comment.