Skip to content

Commit ee0a32e

Browse files
authored
ci: Updated workflows to match latest patterns. (#44)
1 parent 067b1fb commit ee0a32e

6 files changed

Lines changed: 91 additions & 116 deletions

File tree

.github/workflows/branch.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 1 addition & 6 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
@@ -32,7 +27,7 @@ jobs:
3227
build_mode: none
3328
steps:
3429
- name: Checkout repository
35-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3631
- name: Initialize CodeQL
3732
uses: github/codeql-action/init@v4
3833
with:

.github/workflows/main.yaml

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

.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/sarif-annotations@v0.0.3
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/trivy-action@0.33.1
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/sarif-annotations@v0.0.3
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

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AWS Fargate Service 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 launches a service on AWS Fargate. It creates a cluster, task
66
definition, service, and container repository. In addition, it creates the load
@@ -302,9 +302,7 @@ volumes = {
302302
| task_role_arn | ARN of the role attached to the running tasks. | `string` |
303303
| version_parameter | Name of the SSM parameter, if one exists, to store the current version. | `string` |
304304

305-
[badge-checks]: https://github.com/codeforamerica/tofu-modules-aws-fargate-service/actions/workflows/main.yaml/badge.svg
306305
[badge-release]: https://img.shields.io/github/v/release/codeforamerica/tofu-modules-aws-fargate-service?logo=github&label=Latest%20Release
307-
[code-checks]: https://github.com/codeforamerica/tofu-modules-aws-fargate-service/actions/workflows/main.yaml
308306
[container_command]: #container_command
309307
[ecs-exec]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html
310308
[environment_secrets]: #environment_secrets

0 commit comments

Comments
 (0)