Skip to content

Commit

Permalink
Update update-javavalidator.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzautke authored Dec 31, 2024
1 parent bc414af commit 27d7e15
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/update-javavalidator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,20 @@ jobs:
- name: Create patch for Java validator version in action.yml
run: |
branchName="update-java-validator-version-$LATEST_RELEASE"
git checkout -b "$branchName"
BRANCH_NAME="update-java-validator-version-$LATEST_RELEASE"
REMOTE_REPO="https://github.com/FirelyTeam/firely-terminal-pipeline.git"
if git ls-remote --heads "$REMOTE_REPO" "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
echo "Branch '$BRANCH_NAME' already exists. Skipping creation of PR."
exit 0
fi
git checkout -b "$BRANCH_NAME"
yq -i ".inputs.JAVA_VALIDATOR_VERSION.default = \"$NEW_VERSION\"" action.yml
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add action.yml
git commit -m "Update JAVA_VALIDATOR_VERSION to $LATEST_RELEASE"
git push -u origin "$branchName"
gh pr create --base main --head "$branchName" --title "Update JAVA_VALIDATOR_VERSION to $LATEST_RELEASE" --body "This PR updates the JAVA_VALIDATOR_VERSION to $LATEST_RELEASE."
git push -u origin "$BRANCH_NAME"
gh pr create --base main --head "$BRANCH_NAME" --title "Update JAVA_VALIDATOR_VERSION to $LATEST_RELEASE" --body "This PR updates the JAVA_VALIDATOR_VERSION to $LATEST_RELEASE."
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 27d7e15

Please sign in to comment.