From 6b0d268b6705e48c4a626257f98130cdbcdc6b82 Mon Sep 17 00:00:00 2001 From: lbonaldo Date: Wed, 11 Oct 2023 10:27:44 -0400 Subject: [PATCH] Fix ci.yml --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f36652eb1..3b2a6d9eb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,13 @@ jobs: allow_failure: true steps: - uses: actions/checkout@v3 + - name: Create a new branch for test logs + run: | + if [[ ${{ matrix.version }} == '1' ]]; then + git config --local user.name lbonaldo + git config --local user.email "bonaldo.luca12@gmail.com" + git checkout ${GITHUB_REF#refs/heads/}-testlogs 2>/dev/null || git checkout -b ${GITHUB_REF#refs/heads/}-testlogs + fi - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} @@ -39,11 +46,6 @@ jobs: - name: Commit logs and push to repo # only for 1.x versions run: | if [[ ${{ matrix.version }} == '1' ]]; then - git config --local user.name lbonaldo - git config --local user.email "bonaldo.luca12@gmail.com" - git checkout ${GITHUB_REF#refs/heads/} - git checkout -b ${GITHUB_REF#refs/heads/}-testlogs - git pull origin ${GITHUB_REF#refs/heads/}-testlogs git add -f test/Logs git commit -m "Test logs updated" git push origin ${GITHUB_REF#refs/heads/}-testlogs