Skip to content

Commit

Permalink
Merge branch 'main' into add-jordangov
Browse files Browse the repository at this point in the history
  • Loading branch information
jordangov authored Jul 7, 2024
2 parents 124b9fe + 3f5bd18 commit b25ca3f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/hero-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ jobs:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- name: Checkout Target
uses: actions/checkout@v4
with:
repository: jordangov/defcon-poc
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: main
path: target

Expand All @@ -30,16 +31,7 @@ jobs:
- name: Check Submission
id: check_sub
run: >-
pwd;
ls -l;
cat source/open-source-heroes.md;
cat target/open-source-heroes.md;
echo "repository? ${{ github.event.pull_request.head.repo.full_name }} or ${{ github.event.pull_request.base.repo.full_name }} or ${{ github.event.pull_request.repository }}";
echo "ref? ${{ github.event.pull_request.head.ref }} or ${{ github.event.pull_request.base.ref }}";
diff target/open-source-heroes.md source/open-source-heroes.md || true;
echo "Checking diff from ${{ github.event.pull_request.head.ref }} on ${{ github.event.pull_request.head.repo.full_name }}..."
SUBMISSION=`(diff target/open-source-heroes.md source/open-source-heroes.md || true) | awk '/\* @${{github.actor}}/{ print $4 }'`;
CHECK=`echo -n "${{github.actor}}-${{ secrets.SALT }}" | openssl dgst -${{ secrets.ALGO }} | awk '/[a-z0-9]+/{ print $2 }'`;
echo "Confirming submission ($SUBMISSION) for ${{github.actor}} equals check ($CHECK)...";
Expand Down

0 comments on commit b25ca3f

Please sign in to comment.