Skip to content

Commit 2c8b2e8

Browse files
committed
Standardise workflow naming and formatting
1 parent 96d7115 commit 2c8b2e8

File tree

4 files changed

+27
-49
lines changed

4 files changed

+27
-49
lines changed

.github/workflows/lint-and-validate-terraform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint and Validate Terraform
1+
name: Lint and validate Terraform
22

33
on:
44
push:
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: Terraform Plan
1+
name: Plan examples/tags
2+
23
on:
34
workflow_dispatch:
45
push:
56
paths:
67
- "**/*.tf"
7-
- ".github/workflows/plan.yml"
8+
- ".github/workflows/plan-examples-tags.yml"
89
branches:
910
- "**"
1011

@@ -18,7 +19,6 @@ jobs:
1819
terraform_validate:
1920
name: Terraform validate
2021
runs-on: ubuntu-latest
21-
2222
permissions:
2323
id-token: write
2424
contents: read
@@ -28,23 +28,18 @@ jobs:
2828
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
2929
with:
3030
egress-policy: audit
31-
3231
- name: Terraform setup
3332
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
3433
with:
3534
terraform_version: 1.12.1
36-
37-
- name: Checkout
35+
- name: Checkout repository
3836
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39-
40-
- name: Terraform format
37+
- name: terraform fmt -check -recursive
4138
run: terraform fmt -check -recursive
42-
43-
- name: Terraform init
39+
- name: terraform init -backend=false
4440
working-directory: ./examples/tags
45-
run: terraform init -get -backend=false
46-
47-
- name: Terraform validate
41+
run: terraform init -backend=false
42+
- name: terraform validate
4843
working-directory: ./examples/tags
4944
run: terraform validate
5045

@@ -55,7 +50,6 @@ jobs:
5550
defaults:
5651
run:
5752
working-directory: ./examples/tags
58-
5953
permissions:
6054
id-token: write
6155
contents: read
@@ -66,27 +60,22 @@ jobs:
6660
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
6761
with:
6862
egress-policy: audit
69-
7063
- name: Terraform setup
7164
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
7265
with:
7366
terraform_version: 1.12.1
74-
75-
- name: checkout
67+
- name: Checkout repository
7668
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
77-
78-
- name: Configure AWS Credentials
69+
- name: Configure AWS credentials
7970
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
8071
with:
8172
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_ARN}}
8273
aws-region: ${{ secrets.AWS_REGION }}
83-
84-
- name: Terraform initialise
74+
- name: terraform init
8575
run: >
8676
terraform init
8777
-backend-config=bucket=${{ secrets.TERRAFORM_STATE_BUCKET}}
8878
-backend-config=key=${{ secrets.TERRAFORM_STATE_KEY}}
8979
-backend-config=region=${{ secrets.TERRAFORM_STATE_REGION}}
90-
9180
- name: terraform plan
9281
run: terraform plan -out tfplan

.github/workflows/website.yaml renamed to .github/workflows/publish-docs.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Publish website
1+
name: Publish docs
2+
23
on:
34
push:
45
branches:
@@ -15,42 +16,34 @@ permissions:
1516

1617
jobs:
1718
deploy:
18-
name: Publish docs website
19+
name: Publish docs
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Harden the runner (Audit all outbound calls)
2223
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
2324
with:
2425
egress-policy: audit
25-
26-
- name: Checkout code
26+
- name: Checkout repository
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28-
29-
- name: Configure Git Credentials
28+
- name: Configure Git credentials
3029
run: |
3130
git config user.name github-actions[bot]
3231
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
33-
34-
- name: Setup Python
32+
- name: Install Python
3533
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3634
with:
3735
python-version: 3.13
38-
36+
- name: Install Python dependencies
37+
run: pip install -r requirements-docs.txt
3938
- name: Set up build cache
4039
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4140
with:
4241
key: mkdocs-material-${{ hashfiles('.cache/**') }}
4342
path: .cache
4443
restore-keys: |
4544
mkdocs-material-
46-
47-
- name: Install dependencies
48-
run: |
49-
pip install -r requirements-docs.txt
50-
5145
- name: Deploy GitHub Pages
5246
run: mkdocs gh-deploy --force
53-
5447
- name: Save build cache
5548
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5649
with:
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run TFLint
1+
name: TFLint
22

33
on:
44
workflow_call:
@@ -10,23 +10,19 @@ jobs:
1010
tflint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Harden the runner (Audit all outbound calls)
13+
- name: Harden the runner (audit all outbound calls)
1414
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
1515
with:
1616
egress-policy: audit
17-
18-
- name: Checkout Repository
17+
- name: Checkout repository
1918
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20-
21-
- name: Setup TFLint with checksum verification
19+
- name: Install TFLint
2220
uses: terraform-linters/setup-tflint@90f302c255ef959cbfb4bd10581afecdb7ece3e6 # v4.1.1
2321
with:
2422
tflint_version: v0.58.0
2523
checksums: |
26-
1e8ccdf3e4b57ba154545b4343621bf46f25ca8f5cc97e36432469752f7ef0c0
27-
28-
- name: Initialise & Install TFLint AWS Ruleset Plugin
24+
1e8ccdf3e4b57ba154545b4343621bf46f25ca8f5cc97e36432469752f7ef0c0
25+
- name: tflint --init
2926
run: tflint --init
30-
31-
- name: Run TFLint
27+
- name: tflint
3228
run: tflint

0 commit comments

Comments
 (0)