Skip to content

update

update #5

Workflow file for this run

name: Test branch or PR
on:
pull_request:
types: [opened, review_requested, ready_for_review, synchronize, unlocked]
merge_group:
types: [checks_requested]
push:
branches:
- 'dev_test_workflow'
workflow_call:
inputs:
is_priv:
required: true
type: boolean
branch:
required: false
type: string
default: "main"
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
env:
CO_MODELS_SRC: CoModels
jobs:
test_job:
name: Collect information about PR and source
#runs-on: ${{ matrix.runs-on }} # todo
runs-on: ubuntu-latest
steps:
- name: Checkout CoModels branch
uses: actions/checkout@v4
if: github.event.push
with:
ref: ${{ inputs.branch }}
path: ${{ env.CO_MODELS_SRC}}
- name: Set up model name
if: github.event.push
run: echo "{model}=${{ inputs.branch }}" >> $GITHUB_OUTPUT
- name: Checkout PR branch
uses: actions/checkout@v4
if: github.event.pull_request.draft == false && github.base_ref == 'main'
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.event.pull_request.head.sha }}
path: ${{ env.CO_MODELS_SRC}}
- name: Set up model name
if: github.event.pull_request.draft == false && github.base_ref == 'main'
run: echo "{model}=${github.event.pull_request.title}" >> $GITHUB_OUTPUT
#- name: Prepare directories
# run: |
# rel_path="target_dir/${{ steps.pr.outputs.branch }}"
# mkdir -p $rel_path
# cp -rL $rel_path standalone-dir/
#- name: Run script
# run: |
# cd standalone-dir/
# bash run.sh