mirror of
https://github.com/MuRuLOSE/limoka.git
synced 2026-06-18 15:14:18 +02:00
ашч
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -161,10 +161,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Checking branch status before PR..."
|
echo "Checking branch status before PR..."
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git log ${BRANCH_NAME} -1
|
# Check if the branch exists in the remote repository
|
||||||
|
if git ls-remote --exit-code --heads origin ${BRANCH_NAME} >/dev/null 2>&1; then
|
||||||
|
echo "Branch ${BRANCH_NAME} exists in remote repository."
|
||||||
|
git log origin/${BRANCH_NAME} -1 || echo "Failed to view log for ${BRANCH_NAME}"
|
||||||
git diff origin/main origin/${BRANCH_NAME} || echo "No diff between main and ${BRANCH_NAME}"
|
git diff origin/main origin/${BRANCH_NAME} || echo "No diff between main and ${BRANCH_NAME}"
|
||||||
echo "Creating Pull Request..."
|
echo "Creating Pull Request..."
|
||||||
gh pr create --base main --head ${BRANCH_NAME} --title "Update of repositories $(date +'%Y-%m-%d %H:%M:%S')" --body "Automated PR for repository updates"
|
gh pr create --base main --head ${BRANCH_NAME} --title "Update of repositories $(date +'%Y-%m-%d %H:%M:%S')" --body "Automated PR for repository updates" || echo "Failed to create PR"
|
||||||
|
else
|
||||||
|
echo "Branch ${BRANCH_NAME} does not exist in remote repository, skipping PR creation."
|
||||||
|
fi
|
||||||
|
|
||||||
backup:
|
backup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user