-
Notifications
You must be signed in to change notification settings - Fork 0
/
act.sh
executable file
·29 lines (24 loc) · 1.47 KB
/
act.sh
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
#!/bin/bash
#
# Act tool (for executing of GitHub Actions workflows locally)
#
# See more (https://github.com/nektos/act/blob/master/README.md)
#
# change parameters, add/modify propagated secrets before first use
#
cwd=$(dirname $(realpath "${0}"))
# check prerequisites (if all required tools are available)
TOOLS="act"
for tool in ${TOOLS}; do
if [ -z "$(which ${tool})" ]; then
echo "Tool ${tool} has not been found, please install tool in your system"
echo "Installer: https://raw.githubusercontent.com/nektos/act/master/install.sh"
exit 1
fi
done
# perform standalone test job runs on Ubuntu in dry-run mode
time act workflow_dispatch -W "${cwd}/.github/workflows/standalone-test-amd64.yml" -s DH_USER=$(cat ~/DHUser.txt) -s DH_TOKEN=$(cat ~/DHToken.txt) -s GH_TOKEN=$(cat ~/GHToken.txt) -j test-on-linux -a "${USER}" --container-options "-v /dev/:/dev" -n
# perform test job runs on Ubuntu in dry-run mode
time act workflow_dispatch -W "${cwd}/.github/workflows/docker-image-test-amd64-arm64.yml" -s DH_USER=$(cat ~/DHUser.txt) -s DH_TOKEN=$(cat ~/DHToken.txt) -s GH_TOKEN=$(cat ~/GHToken.txt) -j test-on-linux -a "${USER}" --container-options "-v /dev/:/dev" -n
# perform test job runs on MacOS in dry-run mode
#time act workflow_dispatch -W "${cwd}/.github/workflows/docker-image-test-amd64-arm64.yml" -s DH_USER=$(cat ~/DHUser.txt) -s DH_TOKEN=$(cat ~/DHToken.txt) -s GH_TOKEN=$(cat ~/GHToken.txt) -j test-on-mac-via-colima -a "${USER}" --container-options "-v /dev/:/dev" -n