Skip to content

Switch secrets to vars where appropriate (#20) #50

Switch secrets to vars where appropriate (#20)

Switch secrets to vars where appropriate (#20) #50

# Copyright 2022 Google LLC
#
# 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
#
# https://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: 'Validate Readme'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
gen-readme:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup go'
uses: actions/setup-go@v3
with:
go-version: '^1.17.7'
- name: 'Generate Readme'
run: go run scripts/generate.go readme
- name: 'Validate Diff'
run: |
STATUS=$(git status --porcelain)
if [[ -n "$STATUS" ]]; then
echo "ERROR: README has not been updated"
echo ""
echo " Run the following command to update the README: go run scripts/generate.go readme"
exit 1
fi