Skip to content

Commit cfaa971

Browse files
[Update] GITHUB action that creates docker container to make attested and sbom image
1 parent 788c9ed commit cfaa971

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/web-app-publish-docker-container.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,24 @@ jobs:
1111
steps:
1212
- name: checkout branch
1313
uses: actions/checkout@v4
14+
1415
- name: Login to DockerHub Registry
1516
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
17+
1618
- name: Get the version
1719
id: vars
1820
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
19-
- name: Build the Docker image and tag
20-
run: docker build -f reqifviewer/Dockerfile -t stariongroup/reqifviewer:latest -t stariongroup/reqifviewer:${{ steps.vars.outputs.tag }} .
21-
- name: push $RELEASE_VERSION tag
22-
run: docker push stariongroup/reqifviewer:${{ steps.vars.outputs.tag }}
23-
- name: push latest tag
24-
run: docker push stariongroup/reqifviewer:latest
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v2
24+
25+
- name: Build the Docker image, include SBOM and Provenance, and push
26+
run: |
27+
docker buildx build \
28+
--platform=linux/amd64 \
29+
-f reqifviewer/Dockerfile \
30+
-t stariongroup/reqifviewer:latest \
31+
-t stariongroup/reqifviewer:${{ steps.vars.outputs.tag }} \
32+
--sbom=true \
33+
--provenance=true \
34+
--push

0 commit comments

Comments
 (0)