Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

update golang.org/x/crypto for security #362

update golang.org/x/crypto for security

update golang.org/x/crypto for security #362

# Copyright 2020 The Knative 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.
# This file is automagically synced here from github.com/knative-sandbox/.github
# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
name: Boilerplate
on:
pull_request:
branches: [ 'main', 'master', 'release-*' ]
jobs:
check:
name: Boilerplate Check
runs-on: ubuntu-latest
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
extension:
- go
- sh
# Map between extension and human-readable name.
include:
- extension: go
language: Go
- extension: sh
language: Bash
steps:
- name: Set up Golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: "1.21"
check-latest: true
id: go
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- name: Install Tools
run: |
TEMP_PATH="$(mktemp -d)"
cd $TEMP_PATH
echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" 2>&1
echo '::endgroup::'
echo '::group:: Installing boilerplate-check ... https://github.com/mattmoor/boilerplate-check'
go install github.com/mattmoor/boilerplate-check/cmd/boilerplate-check@latest
echo '::endgroup::'
echo "${TEMP_PATH}" >> $GITHUB_PATH
- id: boilerplate_txt
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v1.1.0
with:
files: ./hack/boilerplate/boilerplate.${{ matrix.extension }}.txt
- name: ${{ matrix.language }} license boilerplate
shell: bash
if: ${{ steps.boilerplate_txt.outputs.files_exists == 'true' }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
set -e
cd "${GITHUB_WORKSPACE}" || exit 1
echo '::group:: Running github.com/mattmoor/boilerplate-check for ${{ matrix.language }} with reviewdog 🐶 ...'
# Don't fail because of boilerplate-check
set +o pipefail
boilerplate-check check \
--boilerplate ./hack/boilerplate/boilerplate.${{ matrix.extension }}.txt \
--file-extension ${{ matrix.extension }} \
--exclude "(vendor|third_party)/" |
reviewdog -efm="%A%f:%l: %m" \
-efm="%C%.%#" \
-name="${{ matrix.language }} headers" \
-reporter="github-pr-check" \
-filter-mode="diff_context" \
-fail-on-error="true" \
-level="error"
echo '::endgroup::'