...

Text file src/github.com/sigstore/cosign/v2/.github/workflows/github-oidc.yaml

Documentation: github.com/sigstore/cosign/v2/.github/workflows

     1# Copyright 2021 The Sigstore Authors.
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#     http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15name: Test GitHub OIDC
    16on:
    17  push:
    18    paths:
    19      - '**'
    20      - '!**.md'
    21      - '!doc/**'
    22      - '!**.txt'
    23      - '!images/**'
    24      - '!LICENSE'
    25      - 'test/**'
    26    branches: [ 'main', 'release-*' ]
    27  schedule:
    28    - cron: '0 1 * * *' # 1AM UTC
    29  workflow_dispatch:
    30
    31jobs:
    32  build:
    33    permissions:
    34      id-token: write
    35      packages: write
    36      contents: read
    37    env:
    38      GIT_HASH: ${{ github.sha }}
    39      GIT_VERSION: unstable
    40      GITHUB_RUN_ID: ${{ github.run_id }}
    41      GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
    42      KO_PREFIX: ghcr.io/${{ github.repository }}
    43    runs-on: ubuntu-latest
    44    steps:
    45      - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
    46      - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
    47        with:
    48          go-version: '1.21'
    49          check-latest: true
    50          cache: true
    51
    52      # Install tools.
    53      - uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
    54
    55      - name: build cosign from the HEAD
    56        run: |
    57          make cosign
    58          ./cosign version
    59
    60      - name: Build and sign a container image
    61        run: |
    62          set -e
    63          # Build and publish an image.
    64          make sign-ci-keyless-containers
    65
    66      - name: Build and sign a blob
    67        run: |
    68          set -e
    69          make sign-blob-experimental

View as plain text