chore: add test action file #51
Workflow file for this run
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: "Get Commit Hash on PR Merge" | |
on: | |
pull_request: | |
branches: [main, release] | |
types: | |
- closed | |
jobs: | |
get_commit_hash: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get commit hashes | |
if: ${{ github.event.pull_request.merged == true }} | |
env: | |
BASE_BRANCH: ${{ github.event.pull_request.base.ref }} | |
run: | | |
git checkout $BASE_BRANCH | |
echo "Current Commit: $(git rev-parse HEAD)" | |
echo "Before Commit: $( git rev-parse HEAD^)" |