Merge branch 'main' into feature/update-readme

This commit is contained in:
Tonye Jack 2020-12-11 16:38:24 -05:00 committed by GitHub
commit 52eebe63f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
branch-name branch-names
----------- ------------
Get branch information without the `/ref/*` prefix Get branch information without the `/ref/*` prefix
@ -12,17 +12,20 @@ Get branch information without the `/ref/*` prefix
id: branch-names id: branch-names
- name: Get Ref brach name - name: Get Ref brach name
run: | run: |
echo "${{ steps.branch-name.outputs.ref_branch }}" # Outputs: "main" echo "${{ steps.branch-name.outputs.ref_branch }}"
# Outputs: "main" for non PR branches | "1/merge" for a PR branch
- name: Get Head Ref branch name - name: Get Head Ref branch name
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
run: | run: |
echo "${{ steps.branch-name.outputs.head_ref_branch }}" # Outputs: "feature/test" echo "${{ steps.branch-name.outputs.head_ref_branch }}"
# Outputs: "feature/test" current PR branch.
- name: Get Base Ref branch name - name: Get Base Ref branch name
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
run: | run: |
echo "${{ steps.branch-name.outputs.base_ref_branch }}" # Outputs: "1/merge" echo "${{ steps.branch-name.outputs.base_ref_branch }}"
# Outputs: "main" for main <- PR branch.
``` ```