Skip to content

Commit

Permalink
Add condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sk81biz committed Oct 21, 2024
1 parent 1c81273 commit cb6e4d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ jobs:
- run: echo "🍏 This job's status is ${{ job.status }}."

- name: Check branch
id: get_directory
run: |
BRANCH_REGEX="^hotfix\/v.*|^release\/v.*"
echo ${{ github.ref }}
echo "${GITHUB_REF_NAME}"
echo ${PRODUCT_VERSION}
if [ "${GITHUB_REF_NAME}" = "develop" ]; then
echo "Branch is ${GITHUB_REF_NAME}"
DERECTORY="io"
DIRECTORY="io"
fi
if [[ "${GITHUB_REF_NAME} =~ ${BRANCH_REGEX}" ]]; then
echo "GITHUB_REF_NAME = ${GITHUB_REF_NAME}"
DERECTORY="com"
DIRICTORY="com"
fi
- name: Echo DERECTORY
run: |
echo "DERECTORY IS ${DERECTORY}"
echo "DERECTORY IS ${{ get_directory.DIRECTORY }}"

0 comments on commit cb6e4d7

Please sign in to comment.