Skip to content

pipeline-step_0966771 #341

pipeline-step_0966771

pipeline-step_0966771 #341

Workflow file for this run

name: pipeline-step
run-name: pipeline-step_${{ inputs.dispatch-id }}
on:
workflow_dispatch:
inputs:
dispatch-id:
type: string
required: true
pipeline-context:
type: string
default: "{}"
step-config:
type: string
default: "{}"
runs-on:
type: string
default: ubuntu-latest
jobs:
execute:
runs-on: ${{ inputs.runs-on }}
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: ${{ fromJSON(inputs.step-config).workingDir || '.' }}
env:
SYNAPSE_LOG: debug
SYNAPSE_FORCE_REMOTE_PROJECTS: yes
SYNAPSE_ENV: ${{ fromJSON(inputs.step-config).environment || '' }}
SYNAPSE_PIPELINE_DEPS: ${{ fromJSON(inputs.pipeline-context).deps }}
CROSSREPO_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ fromJSON(inputs.pipeline-context).targetCommit }}
- name: Configure AWS credentials
if: fromJSON(inputs.step-config).inputs.useAws
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.TEST_IAM_ROLE }}
- uses: Cohesible/get-credentials-action@09824e319b5811b924cfbdd208129f2681127ee4
# - run: curl -fsSL "https://synap.sh/install?stepKeyHash=${{ fromJSON(inputs.step-config).synapseStepKeyHash }}" | bash
- run: curl -fsSL "https://synap.sh/install?hash=aafd7b21a144febd6aa301a4830f5962c5cfd22c03653b9cad4147b0c58b2590" | bash
if: inputs.runs-on != 'windows-2022'
# - run: irm https://synap.sh/install.ps1?stepKeyHash=${{ fromJSON(inputs.step-config).synapseStepKeyHash }} | iex
- run: irm https://synap.sh/install.ps1?hash=ecf18483fa359a81d9eb4213ef5bfd1a8a51af5516f5db6dc580e52e7ce44b65 | iex
if: inputs.runs-on == 'windows-2022'
- run: synapse --version
- name: System Dependencies
run: sudo apt-get update -y && sudo apt-get install ${{ fromJSON(inputs.step-config).systemDeps }} -y
if: fromJSON(inputs.step-config).systemDeps && startsWith(inputs.runs-on, 'ubuntu')
- run: ${{ fromJSON(inputs.step-config).commands }}
if: fromJSON(inputs.step-config).commands
- name: Compile
run: ${{ fromJSON(inputs.step-config).compile }}
if: fromJSON(inputs.step-config).compile
- name: Deploy
run: ${{ fromJSON(inputs.step-config).deploy }}
if: fromJSON(inputs.step-config).deploy
- name: Test
run: ${{ fromJSON(inputs.step-config).test }}
if: fromJSON(inputs.step-config).test
- name: Publish
run: ${{ fromJSON(inputs.step-config).publish }}
if: fromJSON(inputs.step-config).publish