Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,38 @@ runs:
- 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 ${{ inputs.version }}
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 ${{ inputs.node-version }} -Directory ${{ inputs.node-directory }} -Prefix ${{ inputs.node-prefix }}
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;${{ inputs.node-directory }};${{ inputs.node-prefix }};$env:PATH"
$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=${{ inputs.node-directory }}"
Add-Content -Path $env:GITHUB_ENV -Encoding utf8 -Value "DASHCAM_NODE_DIR=$env:NODE_DIRECTORY"

- name: Install Dashcam GUI (macOS)
if: ${{ runner.os == 'macOS' }}
Expand Down
6 changes: 5 additions & 1 deletion start/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ runs:
steps:
- name: Start Recording
shell: pwsh
env:
API_KEY: ${{ inputs.api-key }}
LOG_FILE_PATHS: ${{ inputs.log-file-paths }}
CONNECTION_TIMEOUT: ${{ inputs.connection-timeout }}
run: |
$env:PATH = "$env:GITHUB_ACTION_PATH\src\windows;$env:PATH"
Write-Host "Starting recording with Dashcam API key: ${{ inputs.api-key }}"
Expand All @@ -28,7 +32,7 @@ runs:
Write-Host "PWD: $env:PWD"
Get-ChildItem -Path $env:GITHUB_ACTION_PATH\src\windows
Get-Command Dashcam-Start.ps1
Dashcam-Start.ps1 -ApiKey "${{ inputs.api-key }}" -LogFilePaths "${{ inputs.log-file-paths }}" -Timeout "${{ inputs.connection-timeout }}"
Dashcam-Start.ps1 -ApiKey $env:API_KEY -LogFilePaths $env:LOG_FILE_PATHS -Timeout $env:CONNECTION_TIMEOUT

branding:
icon: "video"
Expand Down
5 changes: 3 additions & 2 deletions stop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ runs:
steps:
- name: Stop Recording
shell: pwsh
env:
PROJECT_ID: ${{ inputs.project-id }}
run: |
# Environment variable set by the dashcam-install action
$env:PATH = "$env:DASHCAM_NODE_DIR;$env:DASHCAM_NODE_DIR\npm-installs;$env:PATH"
dashcam create --project ${{ inputs.project-id }} -t "${{ github.workflow }} ${{ github.run_number }}-${{ github.run_attempt }} - ${{ runner.name }}" -p --md >> $env:GITHUB_STEP_SUMMARY

dashcam create --project $env:PROJECT_ID -t "${{ github.workflow }} ${{ github.run_number }}-${{ github.run_attempt }} - ${{ runner.name }}" -p --md >> $env:GITHUB_STEP_SUMMARY
Loading