Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnXuan committed Nov 9, 2023
1 parent fd6852e commit 223b80e
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ on:
push:
branches:
- 'dev_test_workflow'
workflow_call:
inputs:
is_priv:
required: true
type: boolean
branch:
required: false
type: string
default: "main"
workflow_dispatch:

concurrency:
group: test-${{ github.ref }}
Expand All @@ -30,25 +22,18 @@ jobs:
#runs-on: ${{ matrix.runs-on }} # todo
runs-on: ubuntu-latest
steps:
- name: Checkout CoModels branch
uses: actions/checkout@v4
if: github.event_name == 'push'
with:
ref: ${{ inputs.branch }}
path: ${{ env.CO_MODELS_SRC}}
- name: Set up model name
- name: Set up branch name
id: event-info
if: github.event_name == 'push'
run: echo "{model}=${{ inputs.branch }}" >> $GITHUB_OUTPUT
- name: Checkout PR branch
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Set up model name from workflow_dispatch branch
if: github.event_name == 'workflow_dispatch'
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Checkout CoModels 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 }}
ref: ${{ steps.event-info.outputs.branch }}
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: |
Expand Down

0 comments on commit 223b80e

Please sign in to comment.