Skip to content

27.1 kvaciral noncodesigned #5

27.1 kvaciral noncodesigned

27.1 kvaciral noncodesigned #5

Workflow file for this run

name: comment a SHASUM summary for each changed release
on:
pull_request:
branches: [ "main" ]
jobs:
comment-summary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event.pull_request.commits }}
- name: show changed files
run: git diff --no-commit-id --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
- name: run shasum-summary
run: python3 contrib/shasum-summary/main.py ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} > comment
- name: show comment
run: cat comment
- uses: actions/github-script@v7
with:
script: |
const fs = require('node:fs');
fs.readFile('comment', 'utf8', (err, comment) => {
if (err) {
console.error(err);
return;
}
if (comment.length > 0) {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "${{ github.event.pull_request.head.sha }}\n\n" + comment
});
}
});