Add Samira new UX - Update config.yaml #76
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify Branch Author Email | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
verify-branch-author-email: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Verify author emails | |
env: | |
PATTERN: ^[a-z.]+@(basler\.(ch|de)|baloise\.(be|ch|com|de|nl))$ | |
run: | | |
echo "commits on branch:" | |
git log --pretty='tformat:%h %s (%ae)' origin/main.. | tail -n +2 | |
echo | |
git log --format='%ae' origin/main.. | tr [:upper:] [:lower:] | tail -n +2 > emails.txt | |
grep --invert-match --perl-regexp $PATTERN emails.txt > invalid-emails.txt || true | |
echo "invalid emails:" $(cat invalid-emails.txt | wc -l) "of" $(cat emails.txt | wc -l) | |
cat invalid-emails.txt | |
echo | |
if [ -s invalid-emails.txt ]; then | |
echo "ERROR: NOT ALL EMAILS MATCH PATTERN" $PATTERN | |
exit 1 | |
fi | |