Skip to content

Commit 5010638

Browse files
merge main
2 parents 72734da + 3618456 commit 5010638

File tree

3 files changed

+58
-55
lines changed

3 files changed

+58
-55
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ indent_size = unset
2323
[*.py]
2424
indent_size = 4
2525

26+
[*.yaml]
27+
indent_size = unset
28+
2629
[{Dockerfile,Dockerfile.}*]
2730
indent_size = 4
2831

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
name: "Count lines of code"
22
description: "Count lines of code"
33
inputs:
4-
build_datetime:
5-
description: "Build datetime, set by the CI/CD pipeline workflow"
6-
required: true
7-
build_timestamp:
8-
description: "Build timestamp, set by the CI/CD pipeline workflow"
9-
required: true
10-
idp_aws_report_upload_account_id:
11-
description: "IDP AWS account ID"
12-
required: true
13-
idp_aws_report_upload_region:
14-
description: "IDP AWS account region"
15-
required: true
16-
idp_aws_report_upload_role_name:
17-
description: "Role to upload the report"
18-
required: true
19-
idp_aws_report_upload_bucket_endpoint:
20-
description: "Bucket endpoint for the report"
21-
required: true
4+
build_datetime:
5+
description: "Build datetime, set by the CI/CD pipeline workflow"
6+
required: true
7+
build_timestamp:
8+
description: "Build timestamp, set by the CI/CD pipeline workflow"
9+
required: true
10+
idp_aws_report_upload_account_id:
11+
description: "IDP AWS account ID"
12+
required: true
13+
idp_aws_report_upload_region:
14+
description: "IDP AWS account region"
15+
required: true
16+
idp_aws_report_upload_role_name:
17+
description: "Role to upload the report"
18+
required: true
19+
idp_aws_report_upload_bucket_endpoint:
20+
description: "Bucket endpoint for the report"
21+
required: true
2222
runs:
23-
using: "composite"
24-
steps:
25-
- name: "Create CLOC report"
26-
shell: bash
27-
run: |
28-
export BUILD_DATETIME=${{ inputs.build_datetime }}
29-
./scripts/reports/create-lines-of-code-report.sh
30-
- name: "Compress CLOC report"
31-
shell: bash
32-
run: zip lines-of-code-report.json.zip lines-of-code-report.json
33-
- name: "Upload CLOC report as an artefact"
34-
if: ${{ !env.ACT }}
35-
uses: actions/upload-artifact@v3
36-
with:
37-
name: lines-of-code-report.json.zip
38-
path: ./lines-of-code-report.json.zip
39-
retention-days: 21
40-
- name: "Check prerequisites for sending the report"
41-
shell: bash
42-
id: check
43-
run: |
44-
echo "secrets_exist=${{ inputs.idp_aws_report_upload_role_name != '' && inputs.idp_aws_report_upload_bucket_endpoint != '' }}" >> $GITHUB_OUTPUT
45-
- name: "Authenticate to send the report"
46-
if: steps.check.outputs.secrets_exist == 'true'
47-
uses: aws-actions/configure-aws-credentials@v2
48-
with:
49-
role-to-assume: arn:aws:iam::${{ inputs.idp_aws_report_upload_account_id }}:role/${{ inputs.idp_aws_report_upload_role_name }}
50-
aws-region: ${{ inputs.idp_aws_report_upload_region }}
51-
- name: "Send the CLOC report to the central location"
52-
shell: bash
53-
if: steps.check.outputs.secrets_exist == 'true'
54-
run: |
55-
aws s3 cp \
56-
./lines-of-code-report.json.zip \
57-
${{ inputs.idp_aws_report_upload_bucket_endpoint }}/${{ inputs.build_timestamp }}-lines-of-code-report.json.zip
23+
using: "composite"
24+
steps:
25+
- name: "Create CLOC report"
26+
shell: bash
27+
run: |
28+
export BUILD_DATETIME=${{ inputs.build_datetime }}
29+
./scripts/reports/create-lines-of-code-report.sh
30+
- name: "Compress CLOC report"
31+
shell: bash
32+
run: zip lines-of-code-report.json.zip lines-of-code-report.json
33+
- name: "Upload CLOC report as an artefact"
34+
if: ${{ !env.ACT }}
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: lines-of-code-report.json.zip
38+
path: ./lines-of-code-report.json.zip
39+
retention-days: 21
40+
- name: "Check prerequisites for sending the report"
41+
shell: bash
42+
id: check
43+
run: |
44+
echo "secrets_exist=${{ inputs.idp_aws_report_upload_role_name != '' && inputs.idp_aws_report_upload_bucket_endpoint != '' }}" >> $GITHUB_OUTPUT
45+
- name: "Authenticate to send the report"
46+
if: steps.check.outputs.secrets_exist == 'true'
47+
uses: aws-actions/configure-aws-credentials@v2
48+
with:
49+
role-to-assume: arn:aws:iam::${{ inputs.idp_aws_report_upload_account_id }}:role/${{ inputs.idp_aws_report_upload_role_name }}
50+
aws-region: ${{ inputs.idp_aws_report_upload_region }}
51+
- name: "Send the CLOC report to the central location"
52+
shell: bash
53+
if: steps.check.outputs.secrets_exist == 'true'
54+
run: |
55+
aws s3 cp \
56+
./lines-of-code-report.json.zip \
57+
${{ inputs.idp_aws_report_upload_bucket_endpoint }}/${{ inputs.build_timestamp }}-lines-of-code-report.json.zip

.github/actions/scan-dependencies/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
run: zip sbom-repository-report.json.zip sbom-repository-report.json
3333
- name: "Upload SBOM report as an artefact"
3434
if: ${{ !env.ACT }}
35-
uses: actions/upload-artifact@v3
35+
uses: actions/upload-artifact@v4
3636
with:
3737
name: sbom-repository-report.json.zip
3838
path: ./sbom-repository-report.json.zip
@@ -47,7 +47,7 @@ runs:
4747
run: zip vulnerabilities-repository-report.json.zip vulnerabilities-repository-report.json
4848
- name: "Upload vulnerabilities report as an artefact"
4949
if: ${{ !env.ACT }}
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
5252
name: vulnerabilities-repository-report.json.zip
5353
path: ./vulnerabilities-repository-report.json.zip

0 commit comments

Comments
 (0)