Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions license_copyright/license.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 'Update copyright license'
description: Update license years automatically
description: Updates copyright license year automatically
author: "TheAlgorithms"
inputs:
filename:
description: License file name
description: "License filename"
required: true
default: LICENSE
initial_year:
description: Year of the repository's creation
description: "Year of the repository's creation"
required: true
default: 2016
runs:
Expand All @@ -27,11 +27,12 @@ runs:
run: |
git checkout -b license-update-${{ github.sha }}
git commit -m "docs: updating copyright license year"
git push
git push origin license-update-${{ github.sha }}:license-update-${{ github.sha }}
- name: Creating and merging the PR
shell: bash
run: |
if [[ `git status --porcelain` ]]; then
gh pr create --base master --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).'
if [[ $(git log --branches --not --remotes) ]]; then
gh pr create --base ${GITHUB_REF##*/} --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).'
fi
env:
GH_TOKEN: ${{ github.token }}