Sign docker images
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled

This commit is contained in:
Vladimir Dubrovin 2026-06-02 18:12:48 +03:00
parent fbc3ed5a18
commit 757ad916ec
2 changed files with 32 additions and 0 deletions

View File

@ -8,6 +8,7 @@ on:
permissions: permissions:
contents: read contents: read
packages: write packages: write
id-token: write
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
@ -46,6 +47,9 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4 uses: docker/setup-buildx-action@v4
- name: Install cosign
uses: sigstore/cosign-installer@v3
- name: Login to GHCR - name: Login to GHCR
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v4 uses: docker/login-action@v4
@ -81,3 +85,15 @@ jobs:
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.full }} tags: ${{ steps.tags.outputs.full }}
- name: Sign images
if: github.event_name != 'pull_request'
env:
TAGS_MINIMAL: ${{ steps.tags.outputs.minimal }}
TAGS_BUSYBOX: ${{ steps.tags.outputs.busybox }}
TAGS_FULL: ${{ steps.tags.outputs.full }}
run: |
IFS=',' read -ra TAGS <<< "$TAGS_MINIMAL,$TAGS_BUSYBOX,$TAGS_FULL"
for tag in "${TAGS[@]}"; do
cosign sign --yes "$tag"
done

View File

@ -7,6 +7,7 @@ on:
permissions: permissions:
contents: read contents: read
id-token: write
env: env:
REGISTRY: docker.io REGISTRY: docker.io
@ -44,6 +45,9 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4 uses: docker/setup-buildx-action@v4
- name: Install cosign
uses: sigstore/cosign-installer@v3
- name: Login to Docker Hub - name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v4 uses: docker/login-action@v4
@ -77,3 +81,15 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.full }} tags: ${{ steps.tags.outputs.full }}
- name: Sign images
if: github.event_name != 'pull_request'
env:
TAGS_MINIMAL: ${{ steps.tags.outputs.minimal }}
TAGS_BUSYBOX: ${{ steps.tags.outputs.busybox }}
TAGS_FULL: ${{ steps.tags.outputs.full }}
run: |
IFS=',' read -ra TAGS <<< "$TAGS_MINIMAL,$TAGS_BUSYBOX,$TAGS_FULL"
for tag in "${TAGS[@]}"; do
cosign sign --yes "$tag"
done