Actions: Other method for branch name
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s

This commit is contained in:
Cyanoure
2024-09-15 17:06:27 +02:00
parent afb015fed1
commit 8a4a11caf6

View File

@ -26,13 +26,14 @@ jobs:
# Initialize build branch
- name: Initialize build branch
run: |
SOURCE_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
git config --global user.name 'Git Workflow Bot'
git config --global user.email 'noreply@kozelkaricsi.hu'
git fetch --all --unshallow
BRANCH_NAME="${GITHUB_REF_NAME}-build"
BRANCH_NAME="${SOURCE_BRANCH_NAME}-build"
git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist
git switch $BRANCH_NAME || git switch -c $BRANCH_NAME
git merge ${GITHUB_REF_NAME} -m "Update branch [skip ci]"
git merge ${SOURCE_BRANCH_NAME} -m "Update branch [skip ci]"
rm -rf dist
# Install dependencies