Skip to content

Update minilibraries.is-local.org.json #262

Update minilibraries.is-local.org.json

Update minilibraries.is-local.org.json #262

Workflow file for this run

name: Post Merged.md on PR Close
on:
pull_request_target:
types:
- closed
jobs:
post-merged-md:
runs-on: ubuntu-latest
steps:
# Check if the PR was merged
- id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Check if PR was merged
id: pr-merge-check
uses: actions/github-script@v7
with:
script: |
return context.payload.pull_request.merged
# Fetch merged.md content if PR was merged
- name: Fetch merged.md content
if: steps.pr-merge-check.outputs.result == 'true'
run: |
curl -o merged.md https://raw.githubusercontent.com/open-domains/.github/main/merged.md
# Post the content of merged.md as a comment using the custom token
- name: Post comment on PR
if: steps.pr-merge-check.outputs.result == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ steps.create_token.outputs.token }}
script: |
const fs = require('fs');
const content = fs.readFileSync('merged.md', 'utf8');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: content
});