From 27de5f57e0d6bc6758ba44d8e69baaa67cdf5f92 Mon Sep 17 00:00:00 2001 From: "guorong.zheng" <360996299@qq.com> Date: Mon, 29 Apr 2024 20:53:04 +0800 Subject: [PATCH] feat:branch vars --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 978132e408..676a24ce2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,12 @@ jobs: matrix: operating-system: ['ubuntu-20.04'] steps: + - name: Set branch name + id: vars + run: echo ::set-output name=branch::${{ github.ref == 'refs/heads/gd' && 'gd' || 'master' }} - uses: actions/checkout@v3 + with: + ref: ${{ steps.vars.outputs.branch }} - name: Run with setup-python 3.11 uses: actions/setup-python@v4 with: