wedding-planner/.github/workflows/copyright_notice.yml
Manuel Bustillo ace03a6654
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m52s
Run unit tests / unit_tests (pull_request) Successful in 2m50s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 42m16s
Include the copyright notice in spec files
2024-10-28 23:04:10 +01:00

37 lines
1.1 KiB
YAML

name: Add copyright notice
on:
pull_request:
permissions:
contents: write
jobs:
copyright_notice:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACTIONS_TOKEN }}
ref: ${{ github.head_ref }}
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '# Copyright (C) 2024 Manuel Bustillo\n\n'
FileType: '.rb'
Path: 'app/, config/, db/, spec/'
- uses: VinnyBabuManjaly/copyright-action@v1.0.0
with:
CopyrightString: '<%# Copyright (C) 2024 Manuel Bustillo %>\n\n'
FileType: '.erb'
Path: 'app/'
- name: Commit changes
run: |
git config --local user.email "bustikiller@bustikiller.com"
git config --local user.name "Manuel Bustillo"
git add .
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git commit -m "Add copyright notice"
git push
else
echo "no changes";
fi