-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathaction.yml
More file actions
69 lines (59 loc) · 2.1 KB
/
action.yml
File metadata and controls
69 lines (59 loc) · 2.1 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: 'Setup DDEV in GitHub Workflows'
description: 'Set up your GitHub Actions workflow with DDEV'
author: 'Jonas Eberle and DDEV contributors'
inputs:
ddevDir:
description: 'Path to your DDEV project. This path needs to contain the .ddev/ directory.'
required: false
default: '.'
autostart:
description: 'Starts your DDEV project immediately.'
required: false
default: 'true'
version:
description: 'Install a specific DDEV version. Example: 1.24.0'
required: false
default: 'latest'
installScriptUrl:
description: 'URL to the DDEV installation script'
required: true
default: 'https://ddev.com/install.sh'
runs:
using: 'composite'
steps:
- name: Download DDEV install script
shell: bash
run: |
if [[ '${{ inputs.version }}' == 'head' && '${{ inputs.installScriptUrl }}' == 'https://ddev.com/install.sh' ]]; then
SCRIPT_URL="https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_head.sh"
echo "Using head version install script: ${SCRIPT_URL}"
else
SCRIPT_URL="${{ inputs.installScriptUrl }}"
fi
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused -o /tmp/install_ddev.sh "${SCRIPT_URL}"
- name: Install DDEV
shell: bash
run: |
if [[ '${{ inputs.version }}' == 'latest' ]]; then
VERSION_ARG=""
echo "Installing latest stable DDEV version"
elif [[ '${{ inputs.version }}' == 'head' ]]; then
VERSION_ARG=""
echo "Installing DDEV HEAD version"
else
VERSION_ARG="v${{ inputs.version }}"
echo "Installing DDEV version: ${VERSION_ARG}"
fi
# Make installation script executable
chmod +x /tmp/install_ddev.sh
/tmp/install_ddev.sh ${VERSION_ARG}
ddev config global --instrumentation-opt-in=false --omit-containers=ddev-ssh-agent
- name: Start DDEV project
shell: bash
working-directory: ${{ inputs.ddevDir }}
if: inputs.autostart == 'true'
run: |
ddev start
branding:
icon: 'cpu'
color: yellow