From af1e40b92ac218fb1ccd1902b769d4834acd940b Mon Sep 17 00:00:00 2001 From: Fulminazzo Date: Tue, 2 Apr 2024 23:51:01 +0200 Subject: [PATCH] Added check for existence of branches repository --- .github/workflows/gradle.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fb321be1..ad5b4c45 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -49,18 +49,15 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 - - name: Checkout to badges branch - run: 'git checkout -b badges' - shell: bash - - - name: Merge from current branch + - name: Checkout to badges Branch and Merge from Current if: ${{ github.ref_name != 'badges' }} env: BRANCH: ${{ github.ref_name }} - run: |- - git merge $BRANCH + run: |- export BRANCHES=$(git branch -r) - test $(echo $BRANCHES | grep badges) && git pull origin badges + git checkout -b badges + git merge $BRANCH + if [[ $(echo $BRANCHES | grep badges) ]]; then git pull origin badges; fi shell: bash - name: Test with Gradle Wrapper