Skip to content

Commit d684d17

Browse files
committed
ci: Updated workflows to match latest patterns.
1 parent e2680be commit d684d17

File tree

8 files changed

+99
-127
lines changed

8 files changed

+99
-127
lines changed

.github/workflows/branch.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ on:
1313
jobs:
1414
analyze:
1515
name: Analyze (${{ matrix.language }})
16-
# Runner size impacts CodeQL analysis time. To learn more, please see:
17-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
18-
# - https://gh.io/supported-runners-and-hardware-resources
19-
# - https://gh.io/using-larger-runners (GitHub.com only)
20-
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
2116
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2217
permissions:
2318
security-events: write
@@ -28,20 +23,17 @@ jobs:
2823
fail-fast: false
2924
matrix:
3025
include:
31-
# We use javascript to analyze JSON and YAML files.
32-
- language: javascript-typescript
33-
build_mode: none
3426
- language: actions
3527
build_mode: none
3628
steps:
3729
- name: Checkout repository
38-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3931
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v3
32+
uses: github/codeql-action/init@v4
4133
with:
4234
languages: ${{ matrix.language }}
4335
build-mode: ${{ matrix.build-mode }}
4436
- name: Perform CodeQL Analysis
45-
uses: github/codeql-action/analyze@v3
37+
uses: github/codeql-action/analyze@v4
4638
with:
4739
category: "/language:${{matrix.language}}"

.github/workflows/main.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
pull-requests: write
1919
steps:
2020
- name: Checkout source code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
2424
- name: Bump version and create changelog
2525
id: bump
26-
uses: commitizen-tools/commitizen-action@master
26+
uses: commitizen-tools/commitizen-action@0.27.0
2727
with:
2828
push: false
2929
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -34,7 +34,7 @@ jobs:
3434
MESSAGE=$(git log --format=%B -n 1)
3535
echo "message=${MESSAGE}" >> $GITHUB_OUTPUT
3636
- name: Open a pull request for the release
37-
uses: peter-evans/create-pull-request@v7
37+
uses: peter-evans/create-pull-request@v8
3838
with:
3939
branch: release-${{ steps.bump.outputs.version }}
4040
title: ${{ steps.message.outputs.message }}
@@ -48,7 +48,7 @@ jobs:
4848
contents: write
4949
steps:
5050
- name: Checkout source code
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@v6
5252
- name: Get the module name
5353
id: module_name
5454
run: |
@@ -58,7 +58,7 @@ jobs:
5858
echo "name=${MODULE_NAME}" >> $GITHUB_OUTPUT
5959
- name: Get the version from the commit message
6060
id: version
61-
uses: actions/github-script@v7
61+
uses: actions/github-script@v8
6262
env:
6363
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
6464
with:

.github/workflows/tflint.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: TFLint Checks
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
security-events: write
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
env:
17+
# Required to avoid rate limiting when downloading plugins.
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
steps:
20+
- name: Checkout source code
21+
uses: actions/checkout@v6
22+
- name: Cache plugin directory
23+
uses: actions/cache@v5
24+
with:
25+
path: ~/.tflint.d/plugins
26+
key: tflint-${{ hashFiles('.tflint.hcl') }}
27+
- uses: terraform-linters/setup-tflint@v6
28+
name: Setup TFLint
29+
- name: Show version
30+
run: tflint --version
31+
- name: Init TFLint
32+
run: tflint --init
33+
- name: Run TFLint
34+
# Run TFLint, outputting the results to a SARIF file. We use `tee` so
35+
# that we can still see the output in the logs, and capture the exit
36+
# code properly with `pipefail`.
37+
run: |
38+
set -o pipefail
39+
tflint --format sarif --recursive \
40+
--config "$GITHUB_WORKSPACE/.tflint.hcl" \
41+
| tee tflint-results.sarif
42+
exit "${PIPESTATUS[0]}"
43+
- name: Parse SARIF file for annotations
44+
if: always()
45+
uses: jontyms/[email protected]
46+
with:
47+
annotation-level: notice
48+
sarif-file: tflint-results.sarif
49+
- name: Upload SARIF result
50+
if: always()
51+
uses: github/codeql-action/upload-sarif@v4
52+
with:
53+
sarif_file: tflint-results.sarif

.github/workflows/trivy.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Trivy Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
security-events: write
12+
13+
jobs:
14+
trivy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout source code
18+
uses: actions/checkout@v6
19+
- name: Run Trivy vulnerability scanner
20+
uses: aquasecurity/[email protected]
21+
with:
22+
format: sarif
23+
output: trivy-results.sarif
24+
scan-type: config
25+
trivy-config: trivy.yaml
26+
- name: Parse SARIF file for annotations
27+
if: always()
28+
uses: jontyms/[email protected]
29+
with:
30+
annotation-level: notice
31+
sarif-file: trivy-results.sarif
32+
- name: Upload SARIF result
33+
if: always()
34+
uses: github/codeql-action/upload-sarif@v4
35+
with:
36+
sarif_file: trivy-results.sarif

.tflint.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Uncomment if your module uses the aws provider.
22
plugin "aws" {
33
enabled = true
4-
version = "0.40.0"
4+
version = "0.45.0"
55
source = "github.com/terraform-linters/tflint-ruleset-aws"
66
}
77

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AWS Secrets Module
22

3-
[![Main Checks][badge-checks]][code-checks] [![GitHub Release][badge-release]][latest-release]
3+
[![GitHub Release][badge-release]][latest-release]
44

55
This module manages secrets in AWS through [Secrets Manager][secrets-manager].
66
It will create a KMS key for encrypting secrets, and optionally create one or
@@ -123,9 +123,7 @@ applied.
123123
| secrets | A map of created secrets. | `map(object)` |
124124

125125
[2.0.0]: CHANGELOG.md#200-2025-08-19
126-
[badge-checks]: https://github.com/codeforamerica/tofu-modules-aws-secrets/actions/workflows/main.yaml/badge.svg
127126
[badge-release]: https://img.shields.io/github/v/release/codeforamerica/tofu-modules-aws-secrets?logo=github&label=Latest%20Release
128-
[code-checks]: https://github.com/codeforamerica/tofu-modules-aws-secrets/actions/workflows/main.yaml
129127
[latest-release]: https://github.com/codeforamerica/tofu-modules-aws-secrets/releases/latest
130128
[secrets]: #secrets
131129
[secrets-manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html

0 commit comments

Comments
 (0)