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_TOKEN
orDEV_WORKFLOWHUB_API_TOKEN
depending on which instance you are submitting to)
name: 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: 123
This requires an account, token and team to be created on the WorkflowHub dev/sandbox instance: https://dev.workflowhub.eu
This action is triggered manually: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow
name: Test workflow publishing on dev.WorkflowHub
on: workflow_dispatch
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