Compare commits

...

2 Commits

Author SHA1 Message Date
8a4a11caf6 Actions: Other method for branch name
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s
2024-09-15 17:06:27 +02:00
afb015fed1 Actions: Remove dev branch 2024-09-15 17:02:55 +02:00

View File

@ -4,7 +4,6 @@ on:
push: push:
branches: branches:
- main - main
- dev
pull_request: pull_request:
branches: branches:
- main - main
@ -27,13 +26,14 @@ jobs:
# Initialize build branch # Initialize build branch
- name: Initialize build branch - name: Initialize build branch
run: | run: |
SOURCE_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
git config --global user.name 'Git Workflow Bot' git config --global user.name 'Git Workflow Bot'
git config --global user.email 'noreply@kozelkaricsi.hu' git config --global user.email 'noreply@kozelkaricsi.hu'
git fetch --all --unshallow 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 fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist
git switch $BRANCH_NAME || git switch -c $BRANCH_NAME 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 rm -rf dist
# Install dependencies # Install dependencies