-
Notifications
You must be signed in to change notification settings - Fork 119
/
action.yml
50 lines (50 loc) · 1.81 KB
/
action.yml
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
name: 'Flank'
description: 'Run Flank from GitHub actions!'
inputs:
version:
description: 'Flank version to run'
required: false
service_account:
description: 'Service account for authentication. It could be file content or file itself.'
required: true
platform:
description: 'Platform to run [ios | android]'
required: true
flank_configuration_file:
description: 'Flank configuration file'
required: true
outputs:
local_results_directory:
description: "Path to local results directory"
value: ${{ steps.output_paths.outputs.local_results_directory }}
gcloud_results_directory:
description: "Path to Gcloud storage"
value: ${{ steps.output_paths.outputs.gcloud_results_directory }}
runs:
using: "composite"
steps:
- name: Download flankScripts
run: |
curl -L https://github.com/Flank/flank/releases/download/flank-scripts-1.9.1/flank-scripts.jar --output flank-scripts.jar
echo 'java -jar ./flank-scripts.jar "$@"' > flankScripts
chmod +x flankScripts
shell: bash
- id: download_flank
run: |
./flankScripts github download_flank --version=${{ inputs.version }}
shell: bash
- id: authentication
run: |
./flankScripts firebase save_service_account --account='${{ inputs.service_account }}'
shell: bash
- id: run_flank
run: |
java -jar flank.jar firebase test ${{ inputs.platform }} run -c=${{ inputs.flank_configuration_file }}
shell: bash
- id: output_paths
run: |
file_path=$(find . -name "flank-links.log")
local_directory_file=$(sed -n '1p' < $file_path)
echo "local_results_directory=$(dirname $local_directory_file)" >> $GITHUB_OUTPUT
echo "gcloud_results_directory=$(sed -n '2p' < $file_path)" >> $GITHUB_OUTPUT
shell: bash