Skip to content

Update github-actions (major) #1070

Update github-actions (major)

Update github-actions (major) #1070

name: Check generated content
'on':
pull_request:
branches: [main]
jobs:
check:
name: Check generated content
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Check template notice comments
run: |
#!/bin/bash
set -euo pipefail
hack/template_notice.py fix
if [[ -n "$(git status -s)" ]]; then
git --no-pager diff --color
printf "::warning::%s\n" \
"Template notice comments are missing or not in the expected format." \
"Run './hack/template_notice.py fix' to autofix them."
exit 1
fi
- name: Check that files in root are up to date with templates
run: |
#!/bin/bash
set -euo pipefail
hack/selfupdate.sh
if [[ -n "$(git status -s)" ]]; then
git status -s
printf "::warning::%s\n" \
"Files in ./ are not up to date with ./{{cookiecutter.repo_root}}/" \
"Run './hack/selfupdate.sh' to update them."
exit 1
fi