Skip to content
Snippets Groups Projects
validate-release.yml 2.42 KiB
Newer Older
  • Learn to ignore specific revisions
  • #
    # Copyright 2021 The Sigstore Authors.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    name: CI-Validate-Release-Job
    
    on:
      push:
        branches:
          - main
          - release-*
      pull_request:
    
    jobs:
      validate-release-job:
        runs-on: ubuntu-latest
    
        permissions:
          actions: none
          checks: none
          contents: none
          deployments: none
          issues: none
          packages: none
          pull-requests: none
          repository-projects: none
          security-events: none
          statuses: none
    
    
        env:
          CROSS_BUILDER_IMAGE: ghcr.io/gythialy/golang-cross:v1.17.6-3@sha256:312ac8449408302e5fdde452578607cff075bc80052f4526254cd25fa96ce9e0
          COSIGN_IMAGE: gcr.io/projectsigstore/cosign:v1.5.1@sha256:6247b2e693b0e6a62dcfa75eb46b698c1f4cd1aca36aaefafd4bbb2f2b2af717
    
    
          - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0
    
          - name: Extract version of Go to use
    
            run: echo "GOVERSION=$(cat Dockerfile|grep golang | awk ' { print $2 } ' | cut -d '@' -f 1 | cut -d ':' -f 2 | uniq)" >> $GITHUB_ENV
    
          - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 #v2.2.0
    
            with:
              go-version: ${{ env.GOVERSION }}
    
          - uses: anchore/sbom-action/download-syft@3626d7d7b13e87ee6c6f9ded3940dea05a3967bc #v0.6.0
    
            uses: goreleaser/goreleaser-action@79d4afbba1b4eff8b9a98e3d2e58c4dbaf094e2b #v2.8.1
    
          - name: Check Signature
            run: |
              docker run --rm \
              -e COSIGN_EXPERIMENTAL=true \
              -e TUF_ROOT=/tmp \
              $COSIGN_IMAGE \
              verify \
              $CROSS_BUILDER_IMAGE
    
    
          - name: snaphot
            run: make snapshot
            env:
              PROJECT_ID: honk-fake-project
              RUNTIME_IMAGE: gcr.io/distroless/static:debug-nonroot
    
          - name: check binaries
            run: |
              ./dist/rekor-server-linux-amd64 version
              ./dist/rekor-cli-linux-amd64 version