Skip to content

Commit

Permalink
trying to resolve the checksum parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jordangov committed Jul 2, 2024
1 parent f0c5da6 commit 94cee4a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/hero-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ "main" ]

jobs:
test:
check for hero:
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand All @@ -20,9 +20,8 @@ jobs:
run: >-
git fetch origin main;
SUBMISSION=`git diff origin/main..HEAD open-source-heros.md | awk '/\* @${{github.actor}}/{ print $3 }'`;
echo -n "${{github.actor}}-${{secrets.SALT}}" | openssl dgst -${{secrets.ALGO}} -out c.txt;
cat c.txt;
CHECKSUM=`echo -n "${{github.actor}}-${{secrets.SALT}}" | openssl dgst -${{secrets.ALGO}} -out c.txt && cat c.txt;`;
echo -n "${{github.actor}}-${{secrets.SALT}}" | openssl dgst -${{secrets.ALGO}};
CHECKSUM=`echo -n "${{github.actor}}-${{secrets.SALT}}" | openssl dgst -${{secrets.ALGO}} | awk '/[a-z0-9]+/{ print $2 }'`;
echo "Confirming submission ($SUBMISSION) equals checksum ($CHECKSUM)...";
if [[ "$SUBMISSION" = "$CHECKSUM" ]]; then
echo "You are an open source hero!";
Expand Down

0 comments on commit 94cee4a

Please sign in to comment.