go sdk for version 7.1.2 #7
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
name: Create Pull Request for Last Commit on Any Branch | |
on: | |
push: | |
branches: | |
- '*' # Trigger on any branch | |
jobs: | |
create_pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get last commit SHA (Commit 1) | |
id: commit1 | |
run: echo "::set-output name=sha1::$(git rev-parse HEAD~1)" | |
- name: Get current commit SHA (Commit 2) | |
id: commit2 | |
run: echo "::set-output name=sha2::$(git rev-parse HEAD)" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Automated Pull Request for new commit" | |
base: ${{ github.ref_name }} # The current branch name | |
head: ${{ steps.commit1.outputs.sha1 }} # Commit 1 | |
compare-to: ${{ steps.commit2.outputs.sha2 }} # Commit 2 | |
title: "CR: Compare Commit 1 vs Commit 2" | |
body: | | |
This pull request is automatically created to compare: | |
- **Commit 1 (SHA: ${{ steps.commit1.outputs.sha1 }})** and | |
- **Commit 2 (SHA: ${{ steps.commit2.outputs.sha2 }})** | |
reviewers: "" # Optionally add reviewers | |
labels: "auto-generated" # Optionally add labels |