Skip to content

Commit

Permalink
Update update-flatpak-sources.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicStoxm authored Nov 25, 2024
1 parent 4318367 commit 32e4e36
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/update-flatpak-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ jobs:
# Check if the branch exists remotely
if git ls-remote --heads origin $BRANCH | grep -q $BRANCH; then
echo "Branch $BRANCH exists on remote. Creating a local tracking branch."
# Temporarily stash changes
git stash --include-untracked
# Create a local branch that tracks the remote branch
git checkout -t origin/$BRANCH
# Restore stashed changes
git stash pop
else
echo "Branch $BRANCH does not exist. Creating a new branch."
git checkout -b $BRANCH
Expand All @@ -63,3 +71,4 @@ jobs:
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 32e4e36

Please sign in to comment.