Skip to content

Clear all possible token env vars for token accessor test. (#3347) #102

Clear all possible token env vars for token accessor test. (#3347)

Clear all possible token env vars for token accessor test. (#3347) #102

Workflow file for this run

# Copyright 2021 OpenSSF Scorecard 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: publishimage
permissions: read-all
on:
push:
branches:
- main
jobs:
publishimage:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
env:
COSIGN_EXPERIMENTAL: "true"
steps:
- name: Harden Runner
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Clone the code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version-file: go.mod # use version from go.mod so it stays in sync
check-latest: true
- name: install ko
uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- name: publishimage
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
with:
max_attempts: 3
retry_on: error
timeout_minutes: 30
command: |
go env -w GOFLAGS=-mod=mod
make install
make scorecard-ko
- name: Install Cosign
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06
- name: Sign image
run: |
cosign sign --yes ghcr.io/${{github.repository_owner}}/scorecard/v4:${{ github.sha }}