This github action uses the cloudos-cli
, the official Lifebit CloudOS API client, to launch jobs programmatically using the cloudos job run
command.
on: [push]
jobs:
cloudos_job_run:
runs-on: ubuntu-latest
name: Submit CloudOS job programmatically
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Echo cloudos command
uses: lifebit-ai/[email protected]
id: cloudos_job_run
with:
apikey: ${{ secrets.CLOUDOS_APIKEY }}
cloudos_url: 'https://cloudos.lifebit.ai'
workspace_id: ${{ secrets.CLOUDOS_WORKSPACE_ID }}
project_name: 'cloudos-cli-tests'
workflow_name: 'cgpu/rnatoy'
nextflow_profile: 'test'
cost_limit: 2
cloudos_cli_flags: '--resumable'
If set to 'true'
the action only prints the cloudos job run
command instead of executing it. Secrets are stripped before printing. This mode can be used for testing.
The Lifebit CloudOS user personal API token.
⚠️ It is highly recommended to use Github Actions Secrets to define this secret variable. Follow the official Github Actions documentation for reporsitory secrets to set this up for your reporsitory.
The Lifebit CloudOS application hostname without a trailing backslash eg https://cloudos.lifebit.ai
The Lifebit CloudOS workspace id. It Can be found under Settings in the web application. It is recommended to use Github Action repository secrets to set up this variable.
The Lifebit CloudOS workspace id. It can be created and selected from the Lifebit CloudOS web application user interface under Projects.
The Lifebit CloudOS workflow name. It can be created and selected from the Lifebit CloudOS web application user interface under Pipelines & Tools.
A local file with suffix .config, that includes only a params scope enclosed in curly brackets. The file should contain parameter key:value pairs. For example see: cloudos/examples/rnatoy.config'
One or many comma separated strings, indicating the nextflow profile/s to use with your job. Only applicable to Nextflow workflows.'
The exact whole 40 character commit hash to run for the selected pipeline. If not specified it defaults to the last commit of the default branch.
The version tag of the chosen workflow repository. It must exist in the repository
A name to assign to the job run.
Name of the cloud provider used in your CloudOS workspace. Available options: [aws
, azure
]. Default: aws
The type of AWS EC2 instance to use as master node for the job eg c5.xlarge
Disk storage in GB to be used for the master node vm.
The storage mode to use. Available options: [regular,lustre]. Regular is EBS.
The lustre storage to be used when --storage-mode=lustre, in GB. It should be 1200 or a multiple of it.'
Max time to wait (in seconds) to job completion
For WDL workflows, which mainFile (.wdl) is configured to use (string). This is defined when the WDL repository is imported under Pipelines & Tools using the Lifebit CloudOS web application user interface.
For WDL workflows, which importsFile (.zip) is configured to use (string). This is defined when the WDL repository is imported under Pipelines & Tools using the Lifebit CloudOS web application user interface.
Specific Cromwell server authentication token. Only required for WDL jobs.
Name of the repository platform of the workflow. Default=github.
Name of the job batch queue to use with a batch job execution. Default: workspace default.
Cost limit in USD. If the job exceeds the defined cost limit, the job will be aborted.
Request interval in seconds. The options is influencing the request interval for receiving the job status when --wait-completion
is used. The default value is the same as the default of .
Additional cloudos-cli flags, space separated eg '--resumable'
. Available options: [--resumable, --verbose, --wait-completion]
Job ID extracted from Lifebit CloudOS cloudos-cli.