action.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: 'Generate NOTICES'
  2. description: 'Generate a NOTICES containning SDK licenses.'
  3. inputs:
  4. pods:
  5. description: 'Targeted Pods for licences'
  6. required: true
  7. sources:
  8. description: 'Sources of PodSpecs'
  9. required: true
  10. default: 'https://cdn.cocoapods.org'
  11. min-ios-version:
  12. description: 'The minimum version of iOS'
  13. required: true
  14. default: '10.0'
  15. search-local-pod-version:
  16. description: 'Add pod version from local spec repo'
  17. required: true
  18. default: false
  19. type: boolean
  20. notices-path:
  21. description: 'Path of Notices file containing all licences.'
  22. required: true
  23. outputs:
  24. notices_contents:
  25. description: 'contents of notices'
  26. runs:
  27. using: 'composite'
  28. steps:
  29. - uses: ruby/setup-ruby@v1
  30. with:
  31. ruby-version: "2.7"
  32. - name: Generate a NOTICES file
  33. run: |
  34. cd "${{ github.action_path }}"
  35. bundle install
  36. if ${{ inputs.search-local-pod-version == 'true' }} ; then
  37. ruby app.rb --pods ${{ inputs.pods }} --sources ${{ inputs.sources }} --min_ios_version ${{ inputs.min-ios-version }} --search_local_pod_version --notices_path ${{ inputs.notices-path }}
  38. else
  39. ruby app.rb --pods ${{ inputs.pods }} --sources ${{ inputs.sources }} --min_ios_version ${{ inputs.min-ios-version }} --notices_path ${{ inputs.notices-path }}
  40. fi
  41. shell: bash
  42. - name: Upload artifacts
  43. uses: actions/upload-artifact@v3
  44. with:
  45. name: notices
  46. path: ${{ inputs.notices-path }}