-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
096b574
commit 20a1e73
Showing
1 changed file
with
26 additions
and
34 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 |
---|---|---|
|
@@ -37,26 +37,22 @@ jobs: | |
steps: | ||
- name: Trigger | ||
run: echo "Triggered by ${{github.event_name}} event" | ||
|
||
- name: Check Branch Input | ||
run: | | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
else | ||
echo "Checkout branch ${{ github.event.inputs.branch }}" | ||
fi | ||
else | ||
# Extract branch name from github.ref | ||
BRANCH_NAME="${{ github.ref }}" | ||
BRANCH_NAME="${BRANCH_NAME##*/}" # This removes everything before the last '/' | ||
echo "Checkout branch $BRANCH_NAME" | ||
fi | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
fi | ||
fi | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
uses: actions/[email protected] | ||
with: | ||
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}" | ||
- name: Log Current Branch and Commit | ||
run: | | ||
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)" | ||
echo "Current commit: $(git rev-parse HEAD)" | ||
- name: Add extension | ||
run: | | ||
cd $SDK_PATH | ||
|
@@ -124,26 +120,22 @@ jobs: | |
steps: | ||
- name: Trigger | ||
run: echo "Triggered by ${{github.event_name}} event" | ||
|
||
- name: Check Branch Input | ||
run: | | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
else | ||
echo "Checkout branch ${{ github.event.inputs.branch }}" | ||
fi | ||
else | ||
# Extract branch name from github.ref | ||
BRANCH_NAME="${{ github.ref }}" | ||
BRANCH_NAME="${BRANCH_NAME##*/}" # This removes everything before the last '/' | ||
echo "Checkout branch $BRANCH_NAME" | ||
fi | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
fi | ||
fi | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
uses: actions/[email protected] | ||
with: | ||
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}" | ||
- name: Log Current Branch and Commit | ||
run: | | ||
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)" | ||
echo "Current commit: $(git rev-parse HEAD)" | ||
- name: Add extension | ||
run: | | ||
cd $SDK_PATH | ||
|