Skip to content

Commit 806af50

Browse files
committed
CI: use reusable workflow
1 parent 9b96c8d commit 806af50

File tree

3 files changed

+3
-46
lines changed

3 files changed

+3
-46
lines changed

.github/workflows/tofu.yaml

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,8 @@ on:
1616
- '.gitignore'
1717

1818
jobs:
19-
determine-changed-modules:
20-
if: github.event.pull_request.draft == false
21-
runs-on: ubuntu-latest
22-
outputs:
23-
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
24-
steps:
25-
- uses: actions/checkout@v6
26-
with:
27-
fetch-depth: 0
28-
29-
- name: Get changed files
30-
id: changed-files
31-
uses: tj-actions/changed-files@v47
32-
with:
33-
dir_names: true
34-
dir_names_max_depth: 2
35-
dir_names_exclude_current_dir: true
36-
files: "./modules/**"
37-
matrix: true
38-
39-
- name: 'Set output in the matrix format'
40-
id: set-output
41-
run: echo "changed_directories=${{ steps.changed-files.outputs.all_changed_files }}" >> "$GITHUB_OUTPUT"
42-
4319
check:
4420
if: github.event.pull_request.draft == false
45-
runs-on: ubuntu-latest
46-
strategy:
47-
matrix:
48-
dir: "${{fromJson(needs.determine-changed-modules.outputs.matrix)}}"
49-
needs:
50-
- determine-changed-modules
51-
steps:
52-
- uses: actions/checkout@v6
53-
- uses: opentofu/setup-opentofu@v1
54-
55-
- name: Check module ${{ matrix.dir }}
56-
working-directory: ${{ matrix.dir }}
57-
run: |
58-
echo "::notice::Check fmt"
59-
tofu fmt -check
60-
echo "::notice::Init module"
61-
tofu init
62-
echo "::notice::Validate module"
63-
tofu validate -no-color
64-
21+
uses: DoumanAsh/douman-ci/.github/workflows/tofu.yml@master
22+
with:
23+
modules-directory: "./modules/"

modules/aws-integration/versions.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
terraform {
2-
32
required_providers {
43
aws = {
54
source = "aws"

modules/otel-error-tracking/versions.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
terraform {
2-
32
required_providers {
43
datadog = {
54
source = "DataDog/datadog"

0 commit comments

Comments
 (0)