Skip to content

Initial Test

Initial Test #22

Workflow file for this run

name: Check blocklist
on:
issues:
types:
- labeled
permissions:
contents: write
issues: write
jobs:
check-blocklist:
if: ${{ github.event.label.name == 'check blocklist' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Check blocklist from issue
run: |
# https://stackoverflow.com/questions/8153923/how-do-i-define-a-shell-script-variable-to-have-scope-outside-of-the-script
source scripts/check.sh ${{ github.event.issue.body }}
# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions
echo "ENTRIES_BEFORE=$ENTRIES_BEFORE" >> $GITHUB_ENV
echo "LINES_REMOVED=$LINES_REMOVED" >> $GITHUB_ENV
echo "ENTRIES_AFTER=$ENTRIES_AFTER" >> $GITHUB_ENV
echo "IN_TRANCO=$IN_TRANCO" >> $GITHUB_ENV
echo "DEAD_COUNT=$DEAD_COUNT" >> $GITHUB_ENV
echo $ENTRIES_BEFORE
echo $LINES_REMOVED
echo $ENTRIES_AFTER
echo $IN_TRANCO
echo $DEAD_COUNT
- name: Comment results
run: |
gh issue comment ${{ github.event.issue.number }} -b \
"$(echo $ENTRIES_BEFORE)
$(echo $LINES_REMOVED)
$(echo $ENTRIES_AFTER)
$(echo $IN_TRANCO)
$(echo $DEAD_COUNT)"
env:
GH_TOKEN: ${{ github.token }}