Archived
1
0
Fork 0

Update update-poetry.yml

This commit is contained in:
ZoruaFox 2024-01-12 01:21:53 +08:00 committed by GitHub
parent 879a461d77
commit eedf20dfa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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