Skip to content

Commit c5dc97d

Browse files
authored
Merge pull request #6 from nijogeorgep/nijogeorgep-patch-2
Update docker-publish.yml
2 parents 940ae87 + 6ddf397 commit c5dc97d

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ jobs:
4141
java-version: 1.11
4242
- name: Build with Maven
4343
run: mvn -B package --file pom.xml
44-
# Install the cosign tool except on PR
45-
# https://github.com/sigstore/cosign-installer
46-
- name: Install cosign
47-
if: github.event_name != 'pull_request'
48-
uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605
49-
with:
50-
cosign-release: 'v1.7.1'
51-
5244

5345
# Workaround: https://github.com/docker/build-push-action/issues/461
5446
- name: Setup Docker buildx
@@ -71,6 +63,7 @@ jobs:
7163
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
7264
with:
7365
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
66+
tags: type=raw,value={{sha}}
7467

7568
# Build and push Docker image with Buildx (don't push on PR)
7669
# https://github.com/docker/build-push-action
@@ -82,16 +75,3 @@ jobs:
8275
push: ${{ github.event_name != 'pull_request' }}
8376
tags: ${{ steps.meta.outputs.tags }}
8477
labels: ${{ steps.meta.outputs.labels }}
85-
86-
# Sign the resulting Docker image digest except on PRs.
87-
# This will only write to the public Rekor transparency log when the Docker
88-
# repository is public to avoid leaking data. If you would like to publish
89-
# transparency data even for private images, pass --force to cosign below.
90-
# https://github.com/sigstore/cosign
91-
- name: Sign the published Docker image
92-
if: ${{ github.event_name != 'pull_request' }}
93-
env:
94-
COSIGN_EXPERIMENTAL: "true"
95-
# This step uses the identity token to provision an ephemeral certificate
96-
# against the sigstore community Fulcio instance.
97-
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}

0 commit comments

Comments
 (0)