Skip to content

General Updates

General Updates #3

Workflow file for this run

name: acceptance
on:
pull_request:
permissions:
contents: read
pull-requests: write
checks: write
actions: read
jobs:
acceptance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
# if on pull request
- uses: ./
if: github.event_name == 'pull_request'
with:
annotate_pr: true
config_path: config/auditor-sample.yml
json_diff_path: test/diff-sample.json
write_results_path: results.md
- name: verify checksums
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
node -e "
const fs = require('fs');
let data = fs.readFileSync('results/expected_actions_result.md', 'utf8');
data = data.replace(/node20/g, '${{ env.BRANCH_NAME }}');
fs.writeFileSync('results/expected_actions_result.md', data);
"
result_checksum=$(shasum -a 256 results.md | awk '{print $1}')
expected_checksum=$(shasum -a 256 results/expected_actions_result.md | awk '{print $1}')
if [ "$result_checksum" != "$expected_checksum" ]; then
echo "❌ checksums do not match"
echo "expected: $expected_checksum"
echo "..actual: $result_checksum"
exit 1
else
echo "✅ checksums match"
fi