Skip to content

Commit 295e078

Browse files
committed
feat: allow custom setting of resolution width and height
1 parent 6a68f61 commit 295e078

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ author: "Craig Morten"
44
branding:
55
icon: "check-circle"
66
color: "gray-dark"
7+
inputs:
8+
resolutionWidth:
9+
description: "Screen resolution width to use"
10+
required: false
11+
default: "1920"
12+
resolutionHeight:
13+
description: "Screen resolution height to use"
14+
required: false
15+
default: "1080"
716
runs:
817
using: "node16"
918
main: "index.js"

index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ const exec = require("@actions/exec");
44

55
async function main() {
66
try {
7+
// Fix for GitHub actions macos-11 screencapture not working
8+
// REF: https://github.com/actions/runner-images/issues/5960
9+
const width = core.getInput("resolutionWidth") || "1920";
10+
const height = core.getInput("resolutionHeight") || "1080";
11+
712
await exec.exec(
8-
`"/Library/Application Support/VMware Tools/vmware-resolutionSet" 1440 900`
13+
`"/Library/Application Support/VMware Tools/vmware-resolutionSet" ${width} ${height}`
914
);
15+
16+
// Run generic screenreader setup
1017
process.argv.push("--ci");
1118
require("@guidepup/setup");
1219
} catch (err) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@guidepup/setup-action",
3-
"version": "0.3.4",
3+
"version": "0.4.0",
44
"description": "GitHub Action to setup your environment for screen-reader automation.",
55
"main": "index.js",
66
"author": "Craig Morten <craig.morten@hotmail.co.uk>",

0 commit comments

Comments
 (0)