Skip to content

Commit

Permalink
Update gitlab-lts.yml (#5740)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkim-usgs authored Mar 3, 2025
1 parent 4d7ef35 commit 6d5c7db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/gitlab-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ jobs:
git clone https://isis-codebuild-ci:[email protected]/astrogeology/isis-codebuild-ci.git
echo $LTS_VERSION
cd isis-codebuild-ci
if [[ "git ls-remote --exit-code origin $LTS_VERSION" == 2 ]]; then
if [[ $(git ls-remote --heads origin $LTS_VERSION | wc -l) -eq 0 ]]; then
echo "Branch $LTS_VERSION does not exist, will create"
git checkout -b $LTS_VERSION
else
echo "Branch $LTS_VERSION already exists"
git checkout $LTS_VERSION
git reset --hard origin/main
fi
echo -e "\nenv: \n shell: bash \n variables: \n LTS_VERSION: $LTS_VERSION \n BASE_LTS: $BASE_LTS \n ANACONDA_API_TOKEN: $ANACONDA_TOKEN \n GITHUB_SHA: $GITHUB_SHA" >> buildspec-lts.yml
git commit -a -m "$LTS_VERSION"
git push origin $LTS_VERSION --force
git push origin $LTS_VERSION --force

0 comments on commit 6d5c7db

Please sign in to comment.