Actions: Other method for branch name
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s
This commit is contained in:
5
.github/workflows/Build.yml
vendored
5
.github/workflows/Build.yml
vendored
@ -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
|
||||
|
||||
Reference in New Issue
Block a user