-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (43 loc) · 2.08 KB
/
short-read-mngs-full-benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: short-read-mngs full benchmarks
# Launch full-scale short-read-mngs benchmarks for a given point release of czid-workflows. Uses
# GitHub API to trigger them asynchronously on the czid-dev backend.
on:
workflow_dispatch:
inputs:
czid_workflows_release:
description: release (vX.Y.Z) of czid-workflows short-read-mngs
index_version:
description: version (YYYY-MM-DD) of the ncbi index to use
czid_ref:
description: desired git ref in czid monorepo
default: main
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_DEPLOY_TOKEN: ${{secrets.GH_DEPLOY_TOKEN}}
DEBIAN_FRONTEND: noninteractive
GH_CLI_VERSION: 1.7.0
LC_ALL: C.UTF-8
LANG: C.UTF-8
jobs:
trigger_benchmarks:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install release script dependencies
run: |
source /etc/profile
sudo apt-get -qq update
sudo apt-get -qq install -o=Dpkg::Use-Pty=0 --yes jq moreutils gettext httpie git curl
curl -OLs https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_amd64.deb
sudo dpkg -i gh_${GH_CLI_VERSION}_linux_amd64.deb
# Note: the triggered action will use the current revision of the BENCHMARKING code in this
# repo (env.GITHUB_SHA). However, it will run the vX.Y.Z point release of the short-read-mngs
# WORKFLOW code specified in the user inputs.
- name: Trigger benchmarks
run: |
export DEPLOY_REF='${{github.event.inputs.czid_ref}}' GITHUB_TOKEN=${GH_DEPLOY_TOKEN:-GITHUB_TOKEN} CZID_WORKFLOWS_RELEASE='${{github.event.inputs.czid_workflows_release}}' INDEX_VERSION='${{github.event.inputs.index_version}}'
workflow_args=$(jq -n ".ref=env.DEPLOY_REF | .inputs={czid_workflows_release: env.CZID_WORKFLOWS_RELEASE, index_version: env.INDEX_VERSION, czid_workflows_ref: env.GITHUB_SHA}")
gh api repos/:owner/idseq/actions/workflows/short-read-mngs-benchmarks.yml/dispatches --input - <<< "$workflow_args"