Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yaminidhamija authored Apr 17, 2024
1 parent 0a3e812 commit df65ddd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- name: Update Dependabot Configuration
env:
new_release_branch_name: "${{ steps.branch_name.outputs.branch_name }}"
dependabot_update_branch_name: "feature/update-dependabot-target-branch-to-${{ steps.branch_name.outputs.branch_name }}"
run: |
IFS='.' read -r -a version_parts <<< "$new_release_branch_name"
# Split the version string into major, minor, and patch components
Expand All @@ -37,15 +36,18 @@ jobs:
# Construct the new version string with "_DEV" suffix
new_version="$major.$minor""_DEV"
echo "New version: $new_version"
git checkout -b $dependabot_update_branch_name
branch_name = "$new_version_BRANCH"
git checkout -b $branch_name
sed -i "s#\(^ *target-branch: \).*#\1\"$new_version\"#" .github/dependabot.yml
echo ${{ secrets.GH_TOKEN }} | gh auth login --hostname github.com --with-token
# Commit and push the changes
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git add .github/dependabot.yml
git commit -m "Update Dependabot target_branch to $new_release_branch_name"
git commit -m "Update Dependabot target_branch to $new_version"
git push origin $dependabot_update_branch_name
gh pr create --base test -H $dependabot_update_branch_name --title "Update Dependabot target_branch to $new_release_branch_name" --body "Created by Github action"
gh pr create --base test -H $dependabot_update_branch_name --title "Update Dependabot target_branch to $new_version" --body "Created by Github action"

0 comments on commit df65ddd

Please sign in to comment.