Skip to content

Commit

Permalink
copyrights
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jun 7, 2024
1 parent 9a13323 commit bc239c0
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/license.yml → .github/workflows/copyrights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
name: license
name: copyrights
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:
license:
copyrights:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
header="Copyright (c) 2023-$(date +%Y) Yegor Bugayenko"
failed="false"
while IFS= read -r file; do
if ! grep -q "${header}" "${file}"; then
failed="true"
echo "⚠️ Copyright header is not found in: ${file}"
else
echo "File looks good: ${file}"
fi
done < <(find . -type f \( \
-name "LICENSE.txt" -o \
-name "*.sh" -o \
-name "*.rs" -o \
-name "*.yml" \
\) \
-not -path './target/**' \
-print)
if [ "${failed}" = "true" ]; then
exit 1
fi
- uses: yegor256/copyrights-action@0.0.1

0 comments on commit bc239c0

Please sign in to comment.