.gitea/workflows/build.yml aktualisiert
This commit is contained in:
@@ -95,39 +95,16 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Containerfile
|
file: ./Containerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.metadata.outputs.tags }}
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
labels: ${{ steps.metadata.outputs.labels }}
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
|
|
||||||
pull: true
|
|
||||||
|
|
||||||
oci-mediatypes: true
|
oci-mediatypes: true
|
||||||
compression: zstd
|
compression: zstd
|
||||||
|
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: false
|
sbom: false
|
||||||
|
cache-from: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64-main
|
||||||
cache-from: ${{ github.event_name != 'pull_request' && format('type=registry,ref={0}/{1}:buildcache-amd64-main', env.IMAGE_REGISTRY, env.IMAGE_NAME) || '' }}
|
cache-to: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64-main,mode=max
|
||||||
cache-to: ${{ github.event_name != 'pull_request' && format('type=registry,ref={0}/{1}:buildcache-amd64-main,mode=max', env.IMAGE_REGISTRY, env.IMAGE_NAME) || '' }}
|
outputs: type=registry,oci-mediatypes=true,compression=zstd,compression-args=binary-path=/usr/bin/go-zstd-chunked
|
||||||
|
|
||||||
build-args: |
|
|
||||||
BUILDKIT_OCI_MEDIATYPE=true
|
|
||||||
|
|
||||||
outputs: ${{ github.event_name != 'pull_request' && format('type=registry,push=true,oci-mediatypes=true,compression=zstd,compression-args=binary-path=/usr/bin/go-zstd-chunked') || '' }}
|
|
||||||
- name: Inspect pushed image
|
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
IMAGE="${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}"
|
|
||||||
DIGEST="${{ steps.build_image.outputs.digest }}"
|
|
||||||
|
|
||||||
echo "Buildx digest:"
|
|
||||||
echo "${DIGEST}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Registry digest:"
|
|
||||||
docker buildx imagetools inspect \
|
|
||||||
"${IMAGE}:${DEFAULT_TAG}"
|
|
||||||
|
|
||||||
- name: Install gettext dependencies
|
- name: Install gettext dependencies
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||||
@@ -165,7 +142,7 @@ jobs:
|
|||||||
--registry-referrers-mode=legacy \
|
--registry-referrers-mode=legacy \
|
||||||
"${IMAGE}@${DIGEST}"
|
"${IMAGE}@${DIGEST}"
|
||||||
|
|
||||||
- name: Debug container signature
|
- name: Verify container image
|
||||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -173,24 +150,11 @@ jobs:
|
|||||||
IMAGE="${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}"
|
IMAGE="${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||||
DIGEST="${{ steps.build_image.outputs.digest }}"
|
DIGEST="${{ steps.build_image.outputs.digest }}"
|
||||||
|
|
||||||
echo "Image: ${IMAGE}"
|
test -f configs/cosign.pub
|
||||||
echo "Digest: ${DIGEST}"
|
|
||||||
|
|
||||||
echo
|
cosign verify \
|
||||||
echo "=== Cosign version ==="
|
--key configs/cosign.pub \
|
||||||
cosign version
|
"${IMAGE}@${DIGEST}"
|
||||||
|
|
||||||
echo
|
|
||||||
echo "=== Cosign tree ==="
|
|
||||||
cosign tree \
|
|
||||||
--registry-referrers-mode=legacy \
|
|
||||||
"${IMAGE}@${DIGEST}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "=== Cosign download signature ==="
|
|
||||||
cosign download signature \
|
|
||||||
- -registry-referrers-mode=legacy \
|
|
||||||
"${IMAGE}@${DIGEST}"
|
|
||||||
|
|
||||||
- name: Post-Build Cleanup
|
- name: Post-Build Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user