-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.yml
33 lines (29 loc) · 1016 Bytes
/
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
name: puppeteer-chrome
description: Run Test through Puppeteer, the headless chrome Node API
author: tj-actions
inputs:
files:
description: 'Files to run'
required: true
outputs:
container-id:
description: 'Container ID'
value: ${{ steps.puppeteer-run.outputs.container-id }}
home:
description: 'Home directory'
value: /home/pptruser
runs:
using: 'composite'
steps:
- name: Run puppeteer
id: puppeteer-run
uses: tj-actions/docker-run@v2
with:
image: ghcr.io/puppeteer/puppeteer:21.3.8
name: puppeteer-chrome
options: '-i --init --cap-add=SYS_ADMIN -v ${{ github.workspace }}:${{ github.workspace }}'
args: |
bash -c 'while read -r file; do echo "Running $file..." && mkdir -p $(dirname /home/pptruser/$file) && cp ${{ github.workspace }}/$file /home/pptruser/$file && node $file && echo "Completed executing $file"; done <<< "$(echo "${{ inputs.files }}" | xargs -n1)"'
branding:
icon: camera-off
color: white