Bump actions/checkout from 4.1.2 to 4.1.3 #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request_target: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
show_doc_diff: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: read | |
steps: | |
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install pandoc | |
run: ./.github/install_pandoc.sh | |
- uses: coursier/cache-action@142d2738bd29f0eb9d44610828acb3a19809feab # v6.4.6 | |
- name: Generate html | |
run: ./.github/gen_doc.sh | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- run: | | |
cp -r target/specs2-reports/site/* gh-pages/ | |
pushd gh-pages | |
git checkout -- javascript | |
git diff > diff.txt | |
wc -l diff.txt | |
popd | |
- uses: actions/github-script@v7 | |
with: | |
script: | | |
const fs = require('fs'); | |
const diff = fs.readFileSync("gh-pages/diff.txt").toString(); | |
if (diff.length === 0) { | |
console.log("no diff"); | |
} else { | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "```diff\n" + diff + "\n```" | |
}); | |
} |