This is an automated email from the ASF dual-hosted git repository.
wave pushed a commit to branch dfoulks/pelican-gha
in repository https://gitbox.apache.org/repos/asf/petri.git
The following commit(s) were added to refs/heads/dfoulks/pelican-gha by this
push:
new 4b3052e Simplify the process
4b3052e is described below
commit 4b3052ea7e8e67cc301b7895a4ab03d7ad9fc06e
Author: Dave Fisher <[email protected]>
AuthorDate: Mon Jun 10 19:47:09 2024 -0500
Simplify the process
---
.github/workflows/build-pelican.yml | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/build-pelican.yml
b/.github/workflows/build-pelican.yml
index 6f83c29..1275812 100644
--- a/.github/workflows/build-pelican.yml
+++ b/.github/workflows/build-pelican.yml
@@ -17,20 +17,12 @@ jobs:
with:
ref: ${{ github.event.inputs.branch || github.head_ref || github.ref
}}
- name: Determine branch name
- id: get_branch
+ id: determine_branch
run: |
- if [ "${{ github.event_name }}" == "pull_request" ]; then
- echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
- elif [ "${{ github.event_name }}" == "push" ]; then
- echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
- if [ "${{ github.event.inputs.branch }}" != "" ]; then
- echo "BRANCH_NAME=${{ github.event.inputs.branch }}" >>
$GITHUB_ENV
- else
- echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >>
$GITHUB_ENV
- fi
- fi
+ # Get the current branch name
+ BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
- name: Branch
+ id: determine_output_branch
run: |
echo "Branch: ${{ env.BRANCH_NAME }}"
if [ "${{ env.BRANCH_NAME }}" == "${{
github.event.repository.default_branch }}" ]; then