GithubHelp home page GithubHelp logo

xuanxu / upload-metadata-action Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 17 KB

This action adds a metadata JATS file to a paper branch in the papers repository

License: MIT License

Ruby 100.00%

upload-metadata-action's Introduction

Open Journals :: Upload metadata file

This action adds a JATS file to a paper branch in the corresponding Open Journal's papers repository

Usage

Usually this action is used as a step in a workflow after the pdf file and the paper's branch are created.

Inputs

The action accepts the following inputs:

  • jats_path: Required. The path to the jats file with the paper metadata
  • papers_repo: Required. The repository containing the published and submitted papers in owner/reponame format.
  • issue_id: Required. The issue number of the submission of the paper.
  • branch_prefix: Optional. The prefix of the name of the paper's branch.
  • bot_token: Optional. The GitHub access token to be used to upload files. Default: ENV['GH_ACCESS_TOKEN']

Outputs

If the action runs successfully it generates four outpus:

  • crossref_html_url: The HTML URL for the newly uploaded Crossref XML file
  • crossref_download_url: The direct download URL for the Crossref XML file
  • jats_html_url: The HTML URL for the newly uploaded JATS file
  • jats_download_url: The direct download URL for the JATS file

Example

Use it adding it as a step in a workflow .yml file in your repo's .github/workflows/ directory and passing your custom input values (here's an example showing how to pass input values from diferent sources: workflow inputs, secrets or directly).

on:
  workflow_dispatch:
   inputs:
      issue_id:
        description: 'The issue number of the submission'
jobs:
  processing:
    runs-on: ubuntu-latest
    steps:
      - name: Upload file to papers repo
        uses: xuanxu/upload-metadata-action@main
        with:
          papers_repo: myorg/myjournal-papers
          branch_prefix: myjournal
          issue_id: ${{ github.event.inputs.issue_id }}
          jats_path: docs/paper.jats
          bot_token: ${{ secrets.BOT_ACCESS_TOKEN }}
```

upload-metadata-action's People

Contributors

xuanxu avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.