-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #539 from HewlettPackard/code_changes
code_changes_release_automation
- Loading branch information
Showing
3 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: create tag and relese | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
jobs: | ||
create-tag: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.event.pull_request.merged && startsWith(github.head_ref, 'OV') && endsWith(github.head_ref, 'Validation') && startsWith(github.base_ref, 'master') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Bump version and push tag | ||
id: tag_and_prepare_release | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
CUSTOM_TAG: "v8.4.0-13" | ||
- name: Display | ||
run: echo ${{ steps.tag_and_prepare_release.outputs.new_tag }} | ||
- uses: actions/checkout@v2 | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
name: ${{ steps.tag_and_prepare_release.outputs.new_tag }} | ||
tag: ${{ steps.tag_and_prepare_release.outputs.new_tag }} | ||
body: See the <a href="https://github.com/HewlettPackard/oneview-golang/blob/master/CHANGELOG.md">CHANGELOG.md</a> for details. | ||
token: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Raise a Pull Request | ||
|
||
on: | ||
push: | ||
branches: | ||
- "OV*_Validation" # Match branches that start with "OV" and end with "_Validation" | ||
|
||
jobs: | ||
pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Debug information | ||
run: | | ||
echo "Current directory: $(pwd)" | ||
echo "GitHub Token: ${{ secrets.GITHUB_TOKEN }}" | ||
echo "Source Branch: ${{ github.ref }}" | ||
echo "Destination Branch: master" | ||
- name: Determine branch name | ||
id: branch | ||
run: | | ||
branch_name=$(echo "${{ github.ref }}" | sed -n 's/refs\/heads\/OV\(.*\)_Validation/\1/p') | ||
echo "::set-output name=branch_name::$branch_name" | ||
- name: Raise pull request | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: "${{ github.ref }}" # If blank, default: triggered branch | ||
destination_branch: "master" # If blank, default: master | ||
pr_label: "automation" | ||
pr_title: "OV${{ steps.branch.outputs.branch_name }} Validation" # Construct the pull request title without "refs/heads/" and only using the extracted branch name | ||
pr_body: ":crown: *An automated PR*" # Full markdown support, requires pr_title to be set | ||
pr_reviewer: "nabhajit-ray,AvijitOS" | ||
pr_template: ".github/pull_request_template.md" # Path to pull request template, requires pr_title to be set, excludes pr_body | ||
pr_allow_empty: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters