...

Text file src/github.com/sigstore/rekor/.github/workflows/verify.yml

Documentation: github.com/sigstore/rekor/.github/workflows

     1#
     2# Copyright 2021 The Sigstore Authors.
     3#
     4# Licensed under the Apache License, Version 2.0 (the "License");
     5# you may not use this file except in compliance with the License.
     6# You may obtain a copy of the License at
     7#
     8#     http://www.apache.org/licenses/LICENSE-2.0
     9#
    10# Unless required by applicable law or agreed to in writing, software
    11# distributed under the License is distributed on an "AS IS" BASIS,
    12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13# See the License for the specific language governing permissions and
    14# limitations under the License.
    15
    16name: Verify
    17
    18on:
    19  push:
    20    branches:
    21      - main
    22  pull_request:
    23
    24permissions:
    25  contents: read
    26
    27jobs:
    28  license-check:
    29    name: license boilerplate check
    30    runs-on: ubuntu-latest
    31    steps:
    32      - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
    33      - name: Extract version of Go to use
    34        run: echo "GOVERSION=$(cat Dockerfile|grep golang | awk ' { print $2 } ' | cut -d '@' -f 1 | cut -d ':' -f 2 | uniq)" >> $GITHUB_ENV
    35      - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
    36        with:
    37          go-version: ${{ env.GOVERSION }}
    38
    39      - name: Install addlicense
    40        run: go install github.com/google/addlicense@v1.0.0
    41      - name: Check license headers
    42        run: |
    43          set -e
    44          addlicense -l apache -c 'The Sigstore Authors' -v *
    45          git diff --exit-code
    46
    47  golangci:
    48    name: lint
    49    runs-on: ubuntu-latest
    50    steps:
    51      - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
    52      - name: Extract version of Go to use
    53        run: echo "GOVERSION=$(cat Dockerfile|grep golang | awk ' { print $2 } ' | cut -d '@' -f 1 | cut -d ':' -f 2 | uniq)" >> $GITHUB_ENV
    54      - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
    55        with:
    56          go-version: ${{ env.GOVERSION }}
    57
    58      - name: golangci-lint
    59        uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
    60        timeout-minutes: 5
    61        with:
    62          version: v1.56

View as plain text