A GitHub action to submit a workflow repository to WorkflowHub.
- Create a WorkflowHub account
- Create or join an existing WorkflowHub team
- Create a WorkflowHub API token (Menu > My Profile > Actions > API Tokens > New API Token)
- Add your API token as a secret in GitHub https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions (named either
WORKFLOWHUB_API_TOKENorDEV_WORKFLOWHUB_API_TOKENdepending on which instance you are submitting to)
This action can be used to submit one or more workflows to WorkflowHub (or other instance).
The default behaviour assumes the repository contains a single valid Workflow RO-Crate, with the ro-crate-metadata.json located at the root.
Your API token and a valid Team ID must be passed into the action (See the examples below).
To submit multiple workflows, or a workflow that is not located at the root of the repository, you can create a .workflowhub.yml config file.
- For single workflow repositories: provide all the properties at the top-level of the YAML
- For multi-workflow repositories: the top-level of the YAML should contain a
workflowsproperty, with 1 or morepaths listed below.
path is currently the only supported property, which is path in your repository (relative to the root) where the ro-crate-metadata.json can be found. By default this is . (at the root itself).
path: workflows/my-workflowworkflows:
- path: workflows/workflow-1
- path: workflows/workflow-2
- path: workflows/workflow-3name: Publish workflows on WorkflowHub
on:
release:
types: [published]
jobs:
wfh-submit:
name: WorkflowHub submission
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Submit workflows
uses: workflowhub-eu/submission-action@v0
env:
API_TOKEN: ${{ secrets.WORKFLOWHUB_API_TOKEN }}
with:
team_id: 123This requires an account, token and team to be created on the WorkflowHub dev/sandbox instance: https://dev.workflowhub.eu
name: Test workflow publishing on dev.WorkflowHub
on: push
jobs:
wfh-submit:
name: WorkflowHub submission test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Submit workflows
uses: workflowhub-eu/submission-action@v0
env:
API_TOKEN: ${{ secrets.DEV_WORKFLOWHUB_API_TOKEN }}
with:
team_id: 123
instance: https://dev.workflowhub.eu