Skip to content

standard-stable-worker-build #95

standard-stable-worker-build

standard-stable-worker-build #95

name: worker-build
on:
workflow_dispatch:
inputs:
worker_type:
description: "Worker Type"
required: true
type: choice
options:
- standard
- standard_second
- spike_sorting
staging:
description: "Staging"
required: true
default: stable
type: choice
options:
- unstable
- stable
run-name: ${{ inputs.worker_type}}-${{ inputs.staging }}-worker-build
jobs:
get_meta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get_version
name: Get build metadata
run: |
## Get workflow version as codebook env image version
echo "workflow_version=$(cat $(find . -name "version.py" | head -n 1) | grep -oP '\d+\.\d+\.[a-z0-9]+')" >> $GITHUB_OUTPUT
outputs:
workflow_version: ${{steps.get_version.outputs.workflow_version}}
call-worker-ami-build:
needs: [get_meta]
uses: ./.github/workflows/worker-ami-build-2.0.0.yaml
with:
worker_type: ${{github.event.inputs.worker_type}}
workflow_version: ${{needs.get_meta.outputs.workflow_version}}
staging: ${{github.event.inputs.staging}}
runner_timeout: 180 # default, optional
secrets:
RUNNER_PAT: ${{secrets.RUNNER_PAT}}
RUNNER_REGION: ${{secrets.RUNNER_REGION}}
RUNNER_TYPE: ${{secrets.RUNNER_TYPE}}
RUNNER_AMI_ID: ${{secrets.RUNNER_AMI_ID}}
RUNNER_SUBNET_ID: ${{secrets.RUNNER_SUBNET_ID}}
RUNNER_SG_ID: ${{secrets.RUNNER_SG_ID}}
RUNNER_AWS_ACCESS_KEY_ID: ${{secrets.RUNNER_AWS_ACCESS_KEY_ID}}
RUNNER_AWS_SECRET_ACCESS_KEY: ${{secrets.RUNNER_AWS_SECRET_ACCESS_KEY}}
WORKS_API_CLIENT_ID: ${{secrets.WORKS_API_CLIENT_ID}}
WORKS_API_CLIENT_SECRET: ${{secrets.WORKS_API_CLIENT_SECRET}}
BUILD_PAT: ${{secrets.BUILD_PAT}}
BUILD_AWS_ACCESS_KEY_ID: ${{secrets.BUILD_AWS_ACCESS_KEY_ID}}
BUILD_AWS_SECRET_ACCESS_KEY: ${{secrets.BUILD_AWS_SECRET_ACCESS_KEY}}
DEPLOY_SSH_KEY_BASE64: ${{secrets.DEPLOY_SSH_KEY_BASE64}}
DOCKER_REGISTRY_HOST: ${{secrets.DOCKER_REGISTRY_HOST}}
DOCKER_REGISTRY_REPO: ${{secrets.DOCKER_REGISTRY_REPO}}
DOCKER_REGISTRY_USERNAME: ${{secrets.DOCKER_REGISTRY_USERNAME}}
DOCKER_REGISTRY_PASSWORD: ${{secrets.DOCKER_REGISTRY_PASSWORD}}