Skip to content

Commit

Permalink
ensure just-results exists now
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Nov 25, 2024
1 parent e6c3123 commit fb64187
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ jobs:

- name: Ensure just-results branch exists
run: |
git clone https://github.com/${{ github.repository }} previous-results
cd previous-results
git fetch origin
if git show-ref --verify --quiet refs/remotes/origin/just-results; then
echo "just-results branch exists."
git checkout just-results
else
echo "just-results branch does not exist. Creating it."
git checkout --orphan just-results
git rm -rf .
git ls-remote --heads ${{ env.REPO_URL }} just-results
if [ $? -ne 0 ]; then
echo "just-results branch does not exist. Creating it."
git init previous-results
cd previous-results
git checkout -b just-results
touch current_test_results.txt
git add current_test_results.txt
git commit -m "Initialize just-results branch"
git remote add origin ${{ env.REPO_URL }}
git push origin just-results
else
echo "just-results branch exists. Cloning it."
git clone --single-branch --branch just-results --depth 1 ${{ env.REPO_URL }} previous-results
fi
- name: Copy Previous Test Results
Expand Down

0 comments on commit fb64187

Please sign in to comment.