-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea59f78
commit 21e501f
Showing
1 changed file
with
7 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,12 +45,6 @@ jobs: | |
with: | ||
cosign-release: 'v2.1.1' | ||
|
||
# Set up BuildKit Docker container builder to be able to build | ||
# multi-platform images and export cache | ||
# https://github.com/docker/setup-buildx-action | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
|
@@ -69,19 +63,6 @@ jobs: | |
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
# - name: Build and push Docker image | ||
# id: build-and-push | ||
# uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 | ||
# with: | ||
# context: . | ||
# push: ${{ github.event_name != 'pull_request' }} | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
|
||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -98,11 +79,16 @@ jobs: | |
./mvnw -B -ntp -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=me.dtem.AddDependencies -Dcheckstyle.skip | ||
./mvnw -B -ntp versions:update-properties -DincludeProperties="zipkin-reporter-brave.version,datasource-micrometer-spring-boot.version,logstash-logback-encoder.version,logbook.version" -Dcheckstyle.skip | ||
./mvnw -B -ntp package spring-boot:build-image -DskipTests -Dspring-boot.build-image.imageName=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} -Dcheckstyle.skip | ||
- name: Publish | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: bash | ||
id: publish-image | ||
run: | | ||
echo ${{ steps.meta.outputs.tags }} | xargs docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
docker push --quiet --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
echo "DIGEST=$(docker images --format='{{.Digest}}' ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | head -n1)" >> $GITHUB_OUTPUT | ||
# Sign the resulting Docker image digest except on PRs. | ||
# Sign the resulting Docker image digest except on PRs. | ||
# This will only write to the public Rekor transparency log when the Docker | ||
# repository is public to avoid leaking data. If you would like to publish | ||
# transparency data even for private images, pass --force to cosign below. | ||
|
@@ -112,7 +98,7 @@ jobs: | |
env: | ||
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
TAGS: ${{ steps.meta.outputs.tags }} | ||
DIGEST: ${{ steps.build-image.outputs.DIGEST }} | ||
DIGEST: ${{ steps.publish-image.outputs.DIGEST }} | ||
# This step uses the identity token to provision an ephemeral certificate | ||
# against the sigstore community Fulcio instance. | ||
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |