Skip to content

Commit 6d3b4f7

Browse files
committed
JLM-19: Publish build info
1 parent fa7b6f5 commit 6d3b4f7

File tree

2 files changed

+20
-26
lines changed

2 files changed

+20
-26
lines changed

.github/actions/build-docker-image/action.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,22 @@ runs:
6161
type=raw,value=${{ steps.prep.outputs.VERSION }}
6262
type=raw,value=latest
6363
64-
- name: Publish base image
65-
uses: docker/build-push-action@v6
66-
with:
67-
push: true
68-
builder: ${{ steps.buildx.outputs.name }}
69-
context: .
70-
platforms: linux/amd64
71-
file: ./Dockerfile.base
72-
tags: ${{ inputs.image_repository }}-base:latest
73-
cache-from: type=gha,scope=release-base
74-
cache-to: type=gha,scope=release-base,mode=max
64+
# - name: Publish base image
65+
# uses: docker/build-push-action@v6
66+
# with:
67+
# push: true
68+
# builder: ${{ steps.buildx.outputs.name }}
69+
# context: .
70+
# platforms: linux/amd64
71+
# file: ./Dockerfile.base
72+
# tags: ${{ inputs.image_repository }}-base:latest
73+
# cache-from: type=gha,scope=release-base
74+
# cache-to: type=gha,scope=release-base,mode=max
7575

7676

7777
- name: Publish docker image
7878
uses: docker/build-push-action@v6
79+
id: build-push
7980
with:
8081
sbom: true
8182
provenance: true
@@ -91,27 +92,13 @@ runs:
9192
cache-from: type=gha,scope=release-multiarch
9293
cache-to: type=gha,scope=release-multiarch,mode=max
9394

94-
- name: Setup JFrog CLI
95-
uses: jfrog/setup-jfrog-cli@v4
96-
env:
97-
JF_URL: ${{ vars.JF_URL }}
98-
with:
99-
oidc-provider-name: ${{ github.repository }}@github
10095

101-
- name: Capture image digest
102-
id: image-digest
103-
env:
104-
IMAGE_REF: ${{ inputs.image_repository }}:${{ steps.prep.outputs.VERSION }}
105-
shell: bash
106-
run: |
107-
DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE_REF" | cut -d@ -f2)"
108-
echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
10996

11097
- name: Generate signed provenance attestation
11198
uses: actions/attest-build-provenance@v3
11299
with:
113100
subject-name: ${{ env.IMAGE_REPOSITORY }}
114-
subject-digest: ${{ steps.image-digest.outputs.digest }}
101+
subject-digest: ${{ steps.build-push.outputs.digest }}
115102

116103
- name: Publish Build info With JFrog CLI
117104
env:

.github/workflows/main-pipeline.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777

7878
permissions:
7979
id-token: write
80+
attestations: write
8081

8182
outputs:
8283
image_tag: ${{ steps.build.outputs.image_tag }}
@@ -92,6 +93,12 @@ jobs:
9293
role-to-assume: arn:aws:iam::745892955196:role/github-actions
9394
aws-region: us-east-1
9495

96+
- name: Setup JFrog CLI
97+
uses: jfrog/setup-jfrog-cli@v4
98+
env:
99+
JF_URL: ${{ vars.JF_URL }}
100+
with:
101+
oidc-provider-name: ${{ github.repository }}@github
95102

96103
- name: Build and publish images
97104
id: build

0 commit comments

Comments
 (0)