action.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. name: parse branch
  2. description: parse branch names for cache keys
  3. inputs:
  4. branch:
  5. description: 'device kernel'
  6. required: true
  7. runs:
  8. using: composite
  9. steps:
  10. - name: parse cache keys
  11. shell: bash
  12. run: |
  13. #if [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui7" ]]; then
  14. #BASE_BRANCH="SM-A546X-Oneui7"
  15. #echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
  16. #elif [[ "${{ inputs.branch }}" == "SM-A546B-Oneui8" || "${{ inputs.branch }}" == "SM-A546E-Oneui8" ]]; then
  17. #BASE_BRANCH="SM-A546X-Oneui8"
  18. #echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
  19. #elif [[ "${{ inputs.branch }}" == "SM-A055M-Oneui7" || "${{ inputs.branch }}" == "SM-A055F-Oneui7" ]]; then
  20. #BASE_BRANCH="SM-A055X-Oneui7"
  21. #echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
  22. #elif [[ "${{ inputs.branch }}" == "SM-A556B-Oneui7-bitA" || "${{ inputs.branch }}" == "SM-A556E-Oneui7-bitA" ]]; then
  23. #BASE_BRANCH="SM-A556X-Oneui7"
  24. #echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
  25. #else
  26. FULL_BRANCH="${{ inputs.branch }}"
  27. echo "FULL_BRANCH=$FULL_BRANCH" >> $GITHUB_ENV
  28. BASE_BRANCH=$(echo "$FULL_BRANCH" | sed -E 's/(-bit[0-9]+.*$)|(-bit.*$)//i')
  29. echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
  30. #fi