-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (51 loc) · 1.62 KB
/
action.yml
File metadata and controls
51 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Generate NOTICES'
description: 'Generate a NOTICES containning SDK licenses.'
inputs:
pods:
description: 'Targeted Pods for licences'
required: true
sources:
description: 'Sources of PodSpecs'
required: true
default: 'https://cdn.cocoapods.org'
min-ios-version:
description: 'The minimum version of iOS'
required: true
default: '10.0'
search-local-pod-version:
description: 'Add pod version from local spec repo'
required: true
default: false
type: boolean
notices-path:
description: 'Path of Notices file containing all licences.'
required: true
outputs:
notices_contents:
description: 'contents of notices'
runs:
using: 'composite'
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- name: Generate a NOTICES file
run: |
cd "${{ github.action_path }}"
bundle install
if ${{ inputs.search-local-pod-version == 'true' }} ; then
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}
else
ruby app.rb --pods ${INPUTS_PODS} --sources ${INPUTS_SOURCES} --min_ios_version ${INPUTS_MIN_IOS_VERSION} --notices_path ${INPUTS_NOTICES_PATH}
fi
shell: bash
env:
INPUTS_PODS: ${{ inputs.pods }}
INPUTS_SOURCES: ${{ inputs.sources }}
INPUTS_MIN_IOS_VERSION: ${{ inputs.min-ios-version }}
INPUTS_NOTICES_PATH: ${{ inputs.notices-path }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: notices
path: ${{ inputs.notices-path }}