Skip to content

Commit

Permalink
feat(workflow): change log file;
Browse files Browse the repository at this point in the history
- Added change log file workflow.
  • Loading branch information
JVickery-TBS committed May 8, 2024
1 parent d5078cd commit 3dd059d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/change_log.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Changelog Entry
on: [pull_request]

permissions:
contents: read

jobs:
check_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check Chanelog Exists
run: |
ls ./changes/${{ github.event.number }}.* || exit 1
- name: Check Changelog Extension
run: |
fullfile=$(ls ./changes/${{ github.event.number }}.*)
filename=$(basename -- "$fullfile")
extension="${filename##*.}"
allowed_types='[ "fix", "bugfix", "hotfix", "feature", "misc", "changes", "migration", "removal" ]'
if [[ $allowed_types =~ "\"$extension\"" ]]; then
exit 0
else
echo "\n"
echo "ERROR: changelog file ending in ${extension} not supported."
echo "\n"
exit 1
fi

0 comments on commit 3dd059d

Please sign in to comment.