-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaction.yml
More file actions
114 lines (101 loc) · 4.17 KB
/
action.yml
File metadata and controls
114 lines (101 loc) · 4.17 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: "Install Dashcam"
description: "Install Dashcam onto the runner. Must be done before the start action."
author: "TheBrowserCompany"
inputs:
version:
description: "The version of Dashcam to install. See releases here: https://github.com/replayableio/replayable/releases"
required: true
cli-version:
description: "The version of Dashcam cli to install. see: https://www.npmjs.com/package/dashcam?activeTab=versions"
required: false
default: "latest"
node-version:
description: "The version of Node.js to install. Must match the required version for cli see: https://github.com/replayableio/cli/blob/main/package.json"
required: true
node-directory:
description: "The directory to install Node.js to."
required: true
node-prefix:
description: "The prefix to use for Node.js."
required: true
runs:
using: "composite"
steps:
# The Dashcam CLI talks to the running Dashcam GUI, so we need both
- name: Install Dashcam GUI (Windows)
if: ${{ runner.os == 'Windows' }}
shell: pwsh
env:
DASHCAM_VERSION: ${{ inputs.version }}
run: |
$env:PATH = "$env:GITHUB_ACTION_PATH\src\windows;$env:PATH"
Write-Host "Installing Dashcam GUI on ${{ runner.os }}"
Install-DashcamGUI.ps1 -Version $env:DASHCAM_VERSION
- name: Install Node.js for Dashcam CLI (Windows)
if: ${{ runner.os == 'Windows' }}
shell: pwsh
env:
NODE_VERSION: ${{ inputs.node-version }}
NODE_DIRECTORY: ${{ inputs.node-directory }}
NODE_PREFIX: ${{ inputs.node-prefix }}
run: |
Write-Host "Installing Node.js for Dashcam CLI on ${{ runner.os }}"
$env:PATH = "$env:GITHUB_ACTION_PATH\src\windows;$env:PATH"
Install-NodeJS.ps1 -Version $env:NODE_VERSION -Directory $env:NODE_DIRECTORY -Prefix $env:NODE_PREFIX
- name: Install Dashcam CLI (Windows)
if: ${{ runner.os == 'Windows' }}
shell: pwsh
env:
NODE_DIRECTORY: ${{ inputs.node-directory }}
NODE_PREFIX: ${{ inputs.node-prefix }}
run: |
Write-Host "Installing Dashcam CLI on ${{ runner.os }}"
$env:PATH = "$env:GITHUB_ACTION_PATH\src\windows;$env:NODE_DIRECTORY;$env:NODE_PREFIX;$env:PATH"
Install-DashcamCLI.ps1 -Version ${{ inputs.cli-version }}
Add-Content -Path $env:GITHUB_ENV -Encoding utf8 -Value "DASHCAM_NODE_DIR=$env:NODE_DIRECTORY"
- name: Install Dashcam GUI (macOS)
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
echo "Installing Dashcam GUI on ${{ runner.os }}"
bash "$GITHUB_ACTION_PATH/src/mac/Install-DashcamGUI.sh" --version "${{ inputs.version }}"
echo "Dashcam GUI installed"
- name: Install Node.js for Dashcam CLI (macOS)
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
echo "Installing Node.js for Dashcam CLI on ${{ runner.os }}"
bash "$GITHUB_ACTION_PATH/src/mac/Install-Node.sh" --version "${{ inputs.node-version }}" --directory "${{ inputs.node-directory }}" --prefix "${{ inputs.node-prefix }}"
echo "Node.js installed to ${{ inputs.node-directory }}"
- name: Install Dashcam CLI (macOS)
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
echo "Installing Dashcam CLI on ${{ runner.os }}"
bash "$GITHUB_ACTION_PATH/src/mac/Install-DashcamCLI.sh" --version "${{ inputs.cli-version }}"
echo "Dashcam CLI installed"
echo "DASHCAM_NODE_DIR=${{ inputs.node-directory }}" >> $GITHUB_ENV
- name: Install Dashcam GUI (Linux)
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
echo "Installing Dashcam GUI on ${{ runner.os }}"
echo "Not supported yet"
exit 1
- name: Install Node.js for Dashcam CLI (Linux)
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
echo "Installing Node.js for Dashcam CLI on ${{ runner.os }}"
echo "Not supported yet"
exit 1
- name: Install Dashcam CLI (Linux)
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
echo "Installing Dashcam CLI on ${{ runner.os }}"
echo "Not supported yet"
exit 1
branding:
icon: "download"
color: "green"