New packs for drafting #642
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: validate-commit | |
on: [push] | |
env: | |
DISCORD_NAME: coder | |
FILE_SIZE: 0 | |
jobs: | |
validate-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Report branch info | |
run: | | |
echo "Detected push to ${{ github.ref }} by $GITHUB_ACTOR" | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Validate the plugin | |
run: | | |
python3 missingCardFinder.py > output.txt && cat output.txt | |
- name: Check for output | |
run: | | |
export FILESIZE=$(wc -c output.txt | awk '{print $1}') && echo "FILE_SIZE=$FILESIZE" >> $GITHUB_ENV | |
- name: Find Discord user | |
run: | | |
export USERCODE=$(cat .github/workflows/usernames.json | jq -r ."$GITHUB_ACTOR") && echo "DISCORD_NAME=$USERCODE" >> $GITHUB_ENV | |
- name: Send discord message | |
uses: tsickert/[email protected] | |
if: ${{env.FILE_SIZE != '0'}} | |
with: | |
webhook-url: ${{ secrets.validationWebhook }} | |
filename: output.txt | |
content: Hey ${{ env.DISCORD_NAME }}, it looks like there was an error with your last plugin commit on branch ${{ github.ref }}. |