Skip to content

Merge build and trigger release workflows #941

Merge build and trigger release workflows

Merge build and trigger release workflows #941

Workflow file for this run

---
name: Docker Hub
on:
push:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions: {}
jobs:
pull:
if: startsWith(github.ref, 'refs/heads/')
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["linux/amd64", "linux/arm64"]
tag: ["main", "latest"]
steps:
- name: Set REPOSITORY
shell: bash
run: echo "REPOSITORY=${GITHUB_REPOSITORY#*/}" >> "${GITHUB_ENV}"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Pull the ${{ matrix.tag }} ${{ matrix.platform }} image
shell: bash
run: docker pull --platform "${{ matrix.platform }}" "${GITHUB_REPOSITORY_OWNER}/${REPOSITORY}:${{ matrix.tag }}"
- name: Pull the ${{ matrix.tag }} ${{ matrix.platform }} image SBOM
shell: bash
run: docker buildx imagetools inspect "${GITHUB_REPOSITORY_OWNER}/${REPOSITORY}:${{ matrix.tag }}" --format "{{ json (index .SBOM \"${{ matrix.platform }}\").SPDX }}"
- name: Install cosign
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
- name: Verify the ${{ matrix.tag }} image signature
shell: bash
run: |
cosign verify "${GITHUB_REPOSITORY_OWNER}/${REPOSITORY}:${{ matrix.tag }}" --certificate-identity-regexp "https://github\.com/${GITHUB_REPOSITORY}/\.github/workflows/.+" --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'