File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
# /usr/bin/env bash
2
2
3
+ set -e # Fail on first failed command
4
+
3
5
if ! command -v earthly > /dev/null; then
4
- echo " $0 : No Earthly found in PATH"
6
+ echo " $0 : No Earthly found in PATH" >&2
5
7
exit 2
6
8
fi
7
9
8
- set -e # Fail on first failed command
10
+ # Optionally check if gh and the act extension are installed
11
+ if gh act --help > /dev/null 2>&1 ; then
12
+ gh act --artifact-server-path $PWD /workflow-artifacts
13
+ exit $?
14
+ elif ! gh --help > /dev/null 2>&1 ; then
15
+ echo " $0 : No gh found in PATH; falling back to earthly" >&2
16
+ else
17
+ echo " $0 : No nektos/gh-act extension installed; falling back to earthly" >&2
18
+ fi
9
19
10
20
# Workaround for: https://github.com/earthly/earthly/issues/4220
11
21
export EARTHLY_DISABLE_REMOTE_REGISTRY_PROXY=true
You can’t perform that action at this time.
0 commit comments