Skip to content

Commit 880d029

Browse files
test
1 parent e1bab49 commit 880d029

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,41 @@ jobs:
3434
# Build Image
3535
docker build -f ./Dockerfile -t $DOCKER_TAG .
3636
37-
- name: Login to AWS ECR
37+
- name: Make script executable
38+
run: chmod +x ./scripts/sbom-generator.sh
39+
40+
- name: Run the shell script
41+
run: ./scripts/sbom-generator.sh
42+
43+
- name: Collect Artifacts
3844
run: |
39-
DOCKER_REGISTRY="https://${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com"
40-
aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin $DOCKER_REGISTRY
45+
mkdir -p artifacts
46+
pwd
47+
ls
48+
49+
cp -r ./sbom-spdx.json ./artifacts
4150

42-
- name: Publish image to ECR
43-
run: docker push $DOCKER_TAG
51+
- name: Upload SBOM Artifacts
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: SBOM Report
55+
path: ./artifacts/**
56+
compression-level: 9
4457

45-
- name: Logout of AWS ECR (Clean up Credentials)
58+
- name: Temporary Artifacts Cleanup
4659
if: always()
47-
run: |
48-
DOCKER_REGISTRY="https://${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com"
49-
docker logout $DOCKER_REGISTRY
60+
run: rm -rf ./artifacts
61+
62+
# - name: Login to AWS ECR
63+
# run: |
64+
# DOCKER_REGISTRY="https://${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com"
65+
# aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin $DOCKER_REGISTRY
66+
#
67+
# - name: Publish image to ECR
68+
# run: docker push $DOCKER_TAG
69+
#
70+
# - name: Logout of AWS ECR (Clean up Credentials)
71+
# if: always()
72+
# run: |
73+
# DOCKER_REGISTRY="https://${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com"
74+
# docker logout $DOCKER_REGISTRY

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Test Workflow
22
on:
3-
workflow_call:
3+
push:
4+
branches:
5+
- test-sbom
46

57
jobs:
68
checkstyle:

0 commit comments

Comments
 (0)