Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions pull request comments to workflow #327

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/manubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ jobs:
with:
name: manuscript-${{ github.run_id }}-${{ env.TRIGGERING_SHA_7 }}
path: output
- name: Create Artifact Comment
run: |
ARTIFACT_MESSAGE="GitHub Actions build 123456 for commit abcd123 by XXXXX is now complete. The rendered manuscript from this build is temporarily available."
echo "::set-env name=ARTIFACT_MESSAGE::$ARTIFACT_MESSAGE"
- name: Comment on Pull Request
uses: actions/[email protected]
with:
debug: true
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ env.ARTIFACT_MESSAGE }}'
})
- name: Deploy Manuscript
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && !github.event.repository.fork
env:
Expand Down