Update update-poetry.yml
This commit is contained in:
parent
879a461d77
commit
eedf20dfa4
1 changed files with 11 additions and 8 deletions
19
.github/workflows/update-poetry.yml
vendored
19
.github/workflows/update-poetry.yml
vendored
|
@ -13,20 +13,23 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history for all branches and tags
|
||||
|
||||
- name: Checking for branch
|
||||
- name: Check if update-deps branch exists
|
||||
id: check_branch
|
||||
run: |
|
||||
git checkout update-deps
|
||||
if [ `git branch --list update-deps` ]; then
|
||||
echo "相关分支已存在,请删除update-deps分支后再执行本工作流"
|
||||
echo "Branch exists." && exit 1
|
||||
echo "Checking for 'update-deps' branch..."
|
||||
if git ls-remote --heads origin update-deps; then
|
||||
echo "Branch 'update-deps' exists. Stopping workflow."
|
||||
echo "::set-output name=branch_exists::true"
|
||||
else
|
||||
echo "Branch does not exist. Continuing workflow."
|
||||
echo "Branch 'update-deps' does not exist. Continuing workflow."
|
||||
echo "::set-output name=branch_exists::false"
|
||||
fi
|
||||
|
||||
- name: Exit if branch exists
|
||||
if: ${{ steps.check_branch.outputs.branch_exists == 'true' }}
|
||||
run: exit 0
|
||||
|
||||
update-dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-branch-exists
|
||||
|
|
Reference in a new issue