Skip to content

Recommend acceptance #3

Recommend acceptance

Recommend acceptance #3

name: Recommend acceptance
on:
workflow_dispatch:
inputs:
repository_url:
description: 'URL of the repository containing the paper file'
required: true
branch:
description: 'Git branch where the paper Markdown file is'
required: false
issue_id:
description: 'The issue number of the submission'
required: true
add_labels:
description: 'Labels to add to the issue after successful run'
required: false
default: ''
jobs:
preparing-for-acceptance:
name: ${{ format('Prepare paper acceptance in issue {0}', github.event.inputs.issue_id) }}
runs-on: ubuntu-latest
env:
GH_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_REPO: JuliaCon/proceedings-review
ISSUE_ID: ${{ github.event.inputs.issue_id }}
DEFAULT_ERROR: ":warning: [Error preparing paper acceptance](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true)."
steps:
- name: Compile Paper
id: generate-files
uses: openjournals/gh-action-juliacon-pdf-generation@main
with:
repository_url: ${{ github.event.inputs.repository_url }}
branch: ${{ github.event.inputs.branch }}
issue_id: ${{ github.event.inputs.issue_id }}
- name: Upload files to papers repo
id: upload-files
uses: xuanxu/upload-files-action@main
with:
papers_repo: JuliaCon/proceedings-papers
branch_prefix: jcon
issue_id: ${{ github.event.inputs.issue_id }}
pdf_path: ${{ steps.generate-files.outputs.pdf_path}}
crossref_path: ${{ steps.generate-files.outputs.crossref_path}}
- name: Open Pull Request
id: open-pr
uses: xuanxu/deposit-pull-request-action@main
with:
papers_repo: JuliaCon/proceedings-papers
papers_repo_main_branch: master
branch_prefix: jcon
issue_id: ${{ github.event.inputs.issue_id }}
mode: dry-run
- name: Reply message
if: ${{ success() }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body ":wave: @JuliaCon/jcon-eics, this paper is ready to be accepted and published.
Check final proof :point_right::page_facing_up: [Download article](${{ steps.upload-files.outputs.pdf_download_url }})
If the paper PDF and the deposit XML files look good in ${{ steps.open-pr.outputs.pr_url }}, then you can now move forward with accepting the submission by compiling again with the command \`@editorialbot accept\`"
- name: Labeling
if: ${{ success() && github.event.inputs.add_labels != '' }}
run: gh issue edit ${{ github.event.inputs.issue_id }} --add-label ${{ github.event.inputs.add_labels }}
- name: Error message
if: ${{ failure() && env.CUSTOM_ERROR_STATUS != 'sent' }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body "${{ env.DEFAULT_ERROR }} ${{ env.CUSTOM_ERROR }}"